[LON-CAPA-cvs] cvs: loncom /homework grades.pm
www
www@source.lon-capa.org
Sun, 18 Apr 2010 19:29:10 -0000
www Sun Apr 18 19:29:10 2010 EDT
Modified files:
/loncom/homework grades.pm
Log:
Handgrading needs to be decided on response-level. Not on part-level, and
not with a problem-wide $env{'form.handgrade'}
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.623 loncom/homework/grades.pm:1.624
--- loncom/homework/grades.pm:1.623 Sun Apr 18 18:45:41 2010
+++ loncom/homework/grades.pm Sun Apr 18 19:29:10 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.623 2010/04/18 18:45:41 www Exp $
+# $Id: grades.pm,v 1.624 2010/04/18 19:29:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -864,8 +864,6 @@
&commonJSfunctions($request);
$request->print($result);
- my $checkhdgrade = ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked="checked"' : '';
- my $checklastsub = $checkhdgrade eq '' ? 'checked="checked"' : '';
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'.
"\n";
@@ -882,16 +880,12 @@
.&Apache::lonhtmlcommon::row_closure();
my $submission_options;
- if ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1) {
- $submission_options.=
- '<label><input type="radio" name="lastSub" value="hdgrade" '.$checkhdgrade.' /> '.&mt('essay part only').' </label>'."\n";
- }
my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
my $saveStatus = $stu_status eq '' ? 'Active' : $stu_status;
$env{'form.Status'} = $saveStatus;
$submission_options.=
'<span class="LC_nobreak">'.
- '<label><input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> '.
+ '<label><input type="radio" name="lastSub" value="lastonly" /> '.
&mt('last submission only').' </label></span>'."\n".
'<span class="LC_nobreak">'.
'<label><input type="radio" name="lastSub" value="last" /> '.
@@ -918,7 +912,6 @@
$gradeTable .=
&build_section_inputs().
'<input type="hidden" name="submitonly" value="'.$submitonly.'" />'."\n".
- '<input type="hidden" name="handgrade" value="'.$env{'form.handgrade'}.'" /><br />'."\n".
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
'<input type="hidden" name="saveStatusOld" value="'.$saveStatus.'" />'."\n";
@@ -1936,7 +1929,8 @@
# kwclr is the only variable that is guaranteed to be non blank
# if this subroutine has been called once.
my %keyhash = ();
- if ($env{'form.kwclr'} eq '' && $env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.kwclr'} eq '' && $env{'form.handgrade'} eq 'yes') {
+ if (1) {
%keyhash = &Apache::lonnet::dump('nohist_handgrade',
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
@@ -1965,10 +1959,10 @@
'<input type="hidden" name="lastSub" value="'.$env{'form.lastSub'}.'" />'."\n".
&build_section_inputs().
'<input type="hidden" name="submitonly" value="'.$env{'form.submitonly'}.'" />'."\n".
- '<input type="hidden" name="handgrade" value="'.$env{'form.handgrade'}.'" />'."\n".
'<input type="hidden" name="NCT"'.
' value="'.($env{'form.NTSTU'} ne '' ? $env{'form.NTSTU'} : $total+1).'" />'."\n");
- if ($env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.handgrade'} eq 'yes') {
+ if (1) {
$request->print('<input type="hidden" name="keywords" value="'.$env{'form.keywords'}.'" />'."\n".
'<input type="hidden" name="kwclr" value="'.$env{'form.kwclr'}.'" />'."\n".
'<input type="hidden" name="kwsize" value="'.$env{'form.kwsize'}.'" />'."\n".
@@ -1993,7 +1987,8 @@
}
$request->print($prnmsg);
- if ($env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.handgrade'} eq 'yes') {
+ if (1) {
#
# Print out the keyword options line
#
@@ -2069,7 +2064,8 @@
.'<h3 class="LC_hcell">'.&mt('Submissions').'</h3>';
$result.='<input type="hidden" name="name'.$counter.
'" value="'.$env{'form.fullname'}.'" />'."\n";
- if ($env{'form.handgrade'} eq 'no') {
+# if ($env{'form.handgrade'} eq 'no') {
+ if (1) {
$result.='<p class="LC_info">'
.&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)
."</p>\n";
@@ -2078,7 +2074,8 @@
# If any part of the problem is an essay-response (handgraded), then check for collaborators
my $fullname;
my $col_fullnames = [];
- if ($env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.handgrade'} eq 'yes') {
+ if (1) {
(my $sub_result,$fullname,$col_fullnames)=
&check_collaborators($symb,$uname,$udom,\%record,$handgrade,
$counter);
@@ -2229,7 +2226,8 @@
}
# essay grading message center
- if ($env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.handgrade'} eq 'yes') {
+ if (1) {
my $result='<div class="LC_grade_message_center">';
$result.='<div class="LC_grade_message_center_header">'.
@@ -2534,7 +2532,8 @@
}
}
- if ($env{'form.handgrade'} eq 'yes') {
+# if ($env{'form.handgrade'} eq 'yes') {
+ if (1) {
# Keywords sorted in alphabatical order
my $loginuser = $env{'user.name'}.':'.$env{'user.domain'};
my %keyhash = ();
@@ -2595,7 +2594,6 @@
# Go directly to grade student - from submission or link from chart page
if ($button eq 'Grade Student') {
-# (undef,undef,$env{'form.handgrade'},undef,undef) = &showResourceInfo($symb);
my $processUser = $env{'form.unamedom'.$env{'form.studentNo'}};
($env{'form.student'},$env{'form.userdom'}) = split(/:/,$processUser);
$env{'form.fullname'} = $$fullname{$processUser};