Parent Directory
|
Revision Log
added problem library as webwork/ww_prob_lib with revision tag prob-lib-2
1 ##DESCRIPTION 2 ##KEYWORDS() 3 ## This is a questionaire regarding WeBWorK directed to students 4 5 ## who have taken a class using WeBWorK 6 ##ENDDESCRIPTION 7 8 DOCUMENT(); # This should be the first executable line in the problem. 9 10 loadMacros( 11 "PG.pl", 12 "PGbasicmacros.pl", 13 "PGchoicemacros.pl", 14 "PGanswermacros.pl" 15 ); 16 17 ## the following are useful short cuts whixh are uses a lot in the TEXT section below 18 $BL2H = MODES( Latex2HTML =>"\begin{rawhtml}", HTML => '', TeX => ''); 19 $EL2H = MODES( Latex2HTML =>"\end{rawhtml}", HTML => '', TeX => ''); 20 @button_string = ('%0' =>0,1=>1,2=>2,3=>3,4=>4,5=>5); 21 22 $recordSubmittedAnswers =0; ## do not record answers -this is an anonymous survey 23 24 TEXT($BL2H,$EL2H); 25 26 TEXT($BEGIN_ONE_COLUMN); 27 28 TEXT(&beginproblem); 29 30 $questionnaire_text = EV3(<<'END_TEXT'); 31 $BR 32 Dear Students, 33 $BR $BR 34 We would very much appreciate your help in evaluating your TA. 35 36 $PAR 37 Please answer the following questions. 38 $PAR 39 40 \{ $qn = 1; ''\} 41 42 43 A. What mathematics are you currently enrolled in? 44 $BR 45 \{ANS( anstext('A') ) ; 46 OL( 47 ans_radio_buttons( 48 1 => 'MTH 142', 49 2 => 'MTH 162', 50 ) ); 51 \} 52 53 54 $HR 55 B. Who is your TA and what recitation are you attending? 56 $BR 57 \{ANS( anstext('B') ) ; 58 OL( 59 ans_radio_buttons( 60 1 => 'Usman Alim, Thur 6:15-7:15 in Hylan 206 ', 61 2 => 'Candace Gildner, Fri 11:00-11:50 in B&L 269 ', 62 3 => 'Zokrab Moustafaev,Tue 12:30-1:20 in Meliora 221 ', 63 4 => 'Iulian Obreja, Wed 9:00-9:50 in Hutchison 339', 64 5 => 'Iulian Obreja, Wed 12:00-12:50 in Hylan 101 ', 65 6 => 'Iulian Obreja, Tue 4:50-5:40 in Hylan 105 ', 66 7 => 'Diana Pang, Mon 1:00-1:50 in Hutchison 138', 67 8 => 'Cory Rubin, Wed 11:00-11:50 in B&L 315 ', 68 9 => 'Wan Tang, Wed 4:50-5:40 in Hylan 1104 ', 69 0 => 'None', 70 )); 71 \} 72 73 74 75 76 $HR 77 C. Would you take a recitation with this TA again? 78 79 80 \{ANS( anstext('C') ) ; 81 OL( 82 ans_radio_buttons( 83 1 => 'Yes', 84 2 => 'No', 85 )); 86 \} 87 88 89 $HR 90 $PAR 91 92 93 94 Please evaluate you TA each of the following: 95 $PAR 96 $BL2H 97 <TABLE BORDER CELLSPACING=1 CELLPADDING=4 WIDTH=600> 98 <TR><TD COLSPAN="2" VALIGN="TOP" >Scale: 5 excellent, 4 good, 99 3 OK, 2 poor, 1 very poor, 0 no answer</TD> 100 </TR> 101 102 103 <TR><TD WIDTH= "55%" VALIGN="TOP" > 104 $EL2H \{ ANS( anstext(1) ); ans_radio_buttons(@button_string) \} 105 $BL2H </TD> 106 <TD WIDTH= "45%" VALIGN="TOP"> 107 1. Teaching ability 108 </TD></TR> 109 110 <TR><TD WIDTH= "55%" VALIGN="TOP" > 111 $EL2H \{ ANS(anstext(2) ); ans_radio_buttons( @button_string) \} $BL2H </TD> 112 <TD WIDTH="45%" VALIGN="TOP" > 113 2. Speaking ability 114 </TD> 115 </TR> 116 <TR><TD WIDTH= "55%" VALIGN="TOP" > 117 $EL2H \{ ANS(anstext(3) ); ans_radio_buttons( @button_string) \} $BL2H </TD> 118 <TD WIDTH= "45%" VALIGN="TOP"> 119 3. Accessibility during class 120 </TD> 121 </TR> 122 123 <TR><TD WIDTH= "55%" VALIGN="TOP" > 124 $EL2H \{ ANS(anstext(4) ); ans_radio_buttons( @button_string) \} $BL2H </TD> 125 <TD WIDTH= "45%" VALIGN="TOP"> 126 4. Availability outside of class 127 </TD> 128 </TR> 129 130 <TR><TD WIDTH= "55%" VALIGN="TOP" > 131 $EL2H \{ ANS(anstext(5) ); ans_radio_buttons( @button_string) \} $BL2H </TD> 132 <TD WIDTH= "45%" VALIGN="TOP"> 133 5. Overall evaluation 134 </TD> 135 </TR> 136 137 138 139 140 </TABLE> 141 $EL2H 142 $PAR 143 $PAR 144 145 146 6. Please comment on your TA's teaching ability or any other subject you think appropiate.$BR 147 \{ANS(anstext(6)); ans_box( 10,80) \} 148 149 150 $PAR 151 152 Thank you very much. 153 154 155 156 END_TEXT 157 158 TEXT(MODES( HTML => $questionnaire_text, 159 Latex2HTML => $questionnaire_text, 160 TeX => "Please answer the questionnaire on-line. Thank you." 161 )); 162 TEXT($END_ONE_COLUMN); 163 sub mailing_problem_grader{ 164 my $rh_evaluated_answers = shift; 165 my $rh_problem_state = shift; 166 my %form_options = @_; 167 my %evaluated_answers = %{$rh_evaluated_answers}; 168 my %problem_state = %$rh_problem_state; 169 170 171 # %form_options might include 172 # The user login name 173 # The permission level of the user 174 # The studentLogin name for this psvn. 175 # Whether the form is asking for a refresh or is submitting a new answer. 176 177 # initial setup of the answer 178 my %problem_result = ( score => 0, 179 errors => '', 180 type => 'mailing_problem_grader', 181 msg => '', 182 ); 183 # Checks 184 185 my $ansCount = keys %evaluated_answers; # get the number of answers 186 unless ($ansCount > 0 ) { 187 $problem_result{msg} = "This problem did not ask any questions."; 188 return(~~%problem_result,~~%problem_state); 189 } 190 191 192 my $allAnswersCorrectQ=1; 193 my $number_of_answers =0; 194 foreach my $ans_name (keys %evaluated_answers) { 195 # I'm not sure if this check is really useful. 196 if (ref($evaluated_answers{$ans_name} ) eq 'AnswerHash' ) { # changed HASH to AnswerHash dme 10/31/2000 197 $allAnswersCorrectQ = 0 unless( 1 == $evaluated_answers{$ans_name}->{score} ); 198 $number_of_answers++ if $evaluated_answers{$ans_name}->{student_ans}; 199 } else { 200 die "Error: Answer |$ans_name| is not a hash reference\n". 201 $evaluated_answers{$ans_name} . 202 "This probably means that the answer evaluator for this answer\n" . 203 "is not working correctly."; 204 $problem_result{error} = "Error: Answer $ans_name is not a hash: $evaluated_answers{$ans_name}"; 205 } 206 } 207 # report the results 208 $problem_result{msg} = "You can 'answer' this questionnaire more than once. Your additional comments 209 will all be collected together and sent to the education graduate student who is 210 tabulating the questionnaire."; 211 $problem_result{score} = 1; 212 213 # I don't like to put in this bit of code. 214 # It makes it hard to construct error free problem graders 215 # I would prefer to know that the problem score was numeric. 216 unless ($problem_state{recorded_score} =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ ) { 217 $problem_state{recorded_score} = 0; # This gets rid of non-numeric scores 218 } 219 # 220 if ($allAnswersCorrectQ == 1 or $problem_state{recorded_score} == 1) { 221 $problem_state{recorded_score} = 1; 222 } else { 223 $problem_state{recorded_score} = 0; 224 } 225 if ($number_of_answers > 0) { 226 mail_answers_to2('gage@math.rochester.edu','mth142 TA evaluation'); 227 mail_answers_to2('apizer@math.rochester.edu','mth142 TA evaluation'); 228 } 229 230 # You also have to modify the webworkCourse.ph file adding a line sililar to 231 # $PG_environment{'ALLOW_MAIL_TO'} = ['gage@math.rochester.edu','apizer@math.rochester.edu','awda@troi.cc.rochester.edu']; 232 # to enable email 233 234 $problem_state{num_of_correct_ans}++ if $allAnswersCorrectQ == 1; 235 $problem_state{num_of_incorrect_ans}++ if $allAnswersCorrectQ == 0; 236 (~~%problem_result, ~~%problem_state); 237 } 238 239 install_problem_grader(~~&mailing_problem_grader); 240 241 ENDDOCUMENT(); # This should be the last executable line in the problem. # this must be the last statement in any problem.
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |