[system] / branches / gage_dev / pg / macros / PGgraders.pl Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Revision 4996 Revision 4997
1 1
3
5
6=cut
7
9
10###########################################################
11# If the final answer is correct, then the problem is given full credit
12# and a message is generated to that effect. Otherwise, partial credit
13# is given for previous parts.
14
15=cut
2 16
4 # Get the standard inputs to a grader: 18 # Get the standard inputs to a grader:
6 my \$rh_orig_problem_state = shift; 20 my \$rh_orig_problem_state = shift;
11 25
12 26
13 # Evaluate these inputs using the "average problem grader" 27 # Evaluate these inputs using the "average problem grader"
14 my (\$rh_problem_result, \$rh_problem_state) = 28 my (\$rh_problem_result, \$rh_problem_state) =
16
17
18
19
20# #If the final answer is correct, then the problem is given full credit
21# # and a message is generated to that effect.
22
23 30
24 my \$count = keys %{\$rh_evaluated_answers}; 31 my \$count = keys %{\$rh_evaluated_answers};
26 33
27 34
55 62
56 # Return the results of grading the problem. 63 # Return the results of grading the problem.
57 (\$rh_problem_result, \$rh_problem_state); 64 (\$rh_problem_result, \$rh_problem_state);
58} 65}
59 66
60 68
61################################################################ 69################################################################
62# We need a special problem grader on this problem, since we 70# We need a special problem grader on this problem, since we
63# want the student to get full credit for all five answers correct, 71# want the student to get full credit for all five answers correct,
64# 60% credit for four correct, and 0% for three or fewer correct. 72# 60% credit for four correct, and 0% for three or fewer correct.
70# 78#
71# To look at the problem itself, look for the boxed comment below 79# To look at the problem itself, look for the boxed comment below
72# announcing the problem itself. 80# announcing the problem itself.
73################################################################ 81################################################################
74 82
83=cut
75 84
78 my \$rh_problem_state = shift; 87 my \$rh_problem_state = shift;
79 my %form_options = @_; 88 my %form_options = @_;
151 (\%problem_result, \%problem_state); 160 (\%problem_result, \%problem_state);
152 161
153 162
154} 163}
155 164
166
156################################################################ 167################################################################
157# This problem grader was contributed by Prof. Zig Fiedorowicz, 168# This problem grader was contributed by Prof. Zig Fiedorowicz,
158# Dept. of Mathematics, Ohio State University on 8/25/01. 169# Dept. of Mathematics, Ohio State University on 8/25/01.
159# As written, the problem grader should be put in a separate macro file. 170# As written, the problem grader should be put in a separate macro file.
160# If actually inserted into a problem, you need to replace a couple 171# If actually inserted into a problem, you need to replace a couple
161# of backslashes by double tildes. 172# of backslashes by double tildes.
162 173#
163# This is a generalization of the previous custom grader. 174# This is a generalization of the previous custom grader.
164# This grader expects two array references to be passed to it, eg. 175# This grader expects two array references to be passed to it, eg.
167# Both arrays should be of the same length, and in strictly 178# Both arrays should be of the same length, and in strictly
182# for the problems should be passed via 193# for the problems should be passed via
184# or something similar. 195# or something similar.
185################################################################ 196################################################################
186 197
198=cut
187 199