version 1.144, 2003/10/21 21:46:15
|
version 1.145, 2003/10/28 23:20:03
|
Line 572 LISTJAVASCRIPT
|
Line 572 LISTJAVASCRIPT
|
my %status = (); |
my %status = (); |
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
(%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
(%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
my $statusflg = ''; |
my $submitted = 0; |
|
my $graded = 1; |
foreach (keys(%status)) { |
foreach (keys(%status)) { |
$statusflg = 1 if ($status{$_} ne 'nothing'); |
$submitted = 1 if ($status{$_} ne 'nothing'); |
|
$graded = 0 if ($status{$_} =~ /^correct/); |
my ($foo,$partid,$foo1) = split(/\./,$_); |
my ($foo,$partid,$foo1) = split(/\./,$_); |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
$statusflg = ''; |
$submitted = 0; |
$gradeTable.='<input type="hidden" name="'. |
$gradeTable.='<input type="hidden" name="'. |
$student.':submitted_by" value="'. |
$student.':submitted_by" value="'. |
$status{'resource.'.$partid.'.submitted_by'}.'" />'; |
$status{'resource.'.$partid.'.submitted_by'}.'" />'; |
} |
} |
} |
} |
next if ($statusflg eq '' && $submitonly eq 'yes'); |
next if (!$submitted && ($submitonly eq 'yes' || $submitonly eq 'graded')); |
|
next if (!$graded && $submitonly eq 'graded'); |
} |
} |
|
|
$ctr++; |
$ctr++; |
Line 625 LISTJAVASCRIPT
|
Line 628 LISTJAVASCRIPT
|
} else { |
} else { |
$gradeTable='<br /> <font color="red">'. |
$gradeTable='<br /> <font color="red">'. |
'No submissions found for this resource for any students. ('.$num_students. |
'No submissions found for this resource for any students. ('.$num_students. |
' checked for submissions</font><br />'; |
' checked for submissions)</font><br />'; |
} |
} |
} elsif ($ctr == 1) { |
} elsif ($ctr == 1) { |
$gradeTable =~ s/type=checkbox/type=checkbox checked/; |
$gradeTable =~ s/type=checkbox/type=checkbox checked/; |
Line 1830 sub processHandGrade {
|
Line 1833 sub processHandGrade {
|
} |
} |
$ctr = 0; |
$ctr = 0; |
@parsedlist = reverse @parsedlist if ($button eq 'Previous'); |
@parsedlist = reverse @parsedlist if ($button eq 'Previous'); |
|
my ($partlist) = &response_type($url); |
foreach my $student (@parsedlist) { |
foreach my $student (@parsedlist) { |
|
my $submitonly=$ENV{'form.submitonly'}; |
my ($uname,$udom) = split(/:/,$student); |
my ($uname,$udom) = split(/:/,$student); |
if ($ENV{'form.submitonly'} eq 'yes') { |
if ($submitonly =~ /^(yes|graded)$/) { |
my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname); |
# my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$udom,$uname); |
my $statusflg = ''; |
my %status=&student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
foreach (split(/:/,$ENV{'form.gradePartRespid'})){ |
my $submitted = 0; |
$statusflg = 1 if (exists ($record{'resource.'.$_.'.submission'})); |
my $graded = 1; |
|
foreach (keys(%status)) { |
|
$submitted = 1 if ($status{$_} ne 'nothing'); |
|
$graded = 0 if ($status{$_} =~ /^correct/); |
|
my ($foo,$partid,$foo1) = split(/\./,$_); |
|
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
|
$submitted = 0; |
|
} |
} |
} |
next if ($statusflg eq ''); |
next if (!$submitted && ($submitonly eq 'yes' || $submitonly eq 'graded')); |
|
next if (!$graded && $submitonly eq 'graded'); |
} |
} |
push @nextlist,$student if ($ctr < $ntstu); |
push @nextlist,$student if ($ctr < $ntstu); |
last if ($ctr == $ntstu); |
last if ($ctr == $ntstu); |
Line 3551 sub gradingmenu {
|
Line 3564 sub gradingmenu {
|
} |
} |
formname.command.value = cmd; |
formname.command.value = cmd; |
formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+ |
formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+ |
":saveSub="+radioSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status); |
":saveSub="+pullDownSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status); |
if (val < 5) formname.submit(); |
if (val < 5) formname.submit(); |
if (val == 5) { |
if (val == 5) { |
if (!checkReceiptNo(formname,'notOK')) { return false;} |
if (!checkReceiptNo(formname,'notOK')) { return false;} |
Line 3619 GRADINGMENUJS
|
Line 3632 GRADINGMENUJS
|
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
'<input type="radio" name="radioChoice" value="submission" '. |
'<input type="radio" name="radioChoice" value="submission" '. |
($saveCmd eq 'submission' ? 'checked' : '').'> '.'<b>Current Resource:</b> For one or more students'. |
($saveCmd eq 'submission' ? 'checked' : '').'> '.'<b>Current Resource:</b> For one or more students '. |
'<br /> -->For students with '. |
'<select name="submitonly">'. |
'<input type="radio" name="submitonly" value="yes" '. |
'<option value="yes" '. |
($saveSub eq 'yes' ? 'checked' : '').' /> submissions or '. |
($saveSub eq 'yes' ? 'selected="on"' : '').'>with submissions</option>'. |
'<input type="radio" name="submitonly" value="all" '. |
'<option value="graded" '. |
($saveSub eq 'all' ? 'checked' : '').' /> for all</td></tr>'."\n"; |
($saveSub eq 'graded' ? 'selected="on"' : '').'>with ungraded submissions</option>'. |
|
'<option value="all" '. |
|
($saveSub eq 'all' ? 'selected="on"' : '').'>with any status</option></select></td></tr>'."\n"; |
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
'<input type="radio" name="radioChoice" value="viewgrades" '. |
'<input type="radio" name="radioChoice" value="viewgrades" '. |