--- loncom/homework/grades.pm 2005/09/21 21:44:55 1.286
+++ loncom/homework/grades.pm 2005/09/23 16:57:42 1.289
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.286 2005/09/21 21:44:55 albertel Exp $
+# $Id: grades.pm,v 1.289 2005/09/23 16:57:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1370,10 +1370,10 @@ sub gradeBox {
my $ctr = 0;
$result.='
'."\n"; # display radio buttons in a nice table 10 across
while ($ctr<=$wgt) {
- $result.= ' | \n";
+ ($score eq $ctr ? 'checked':'').' /> '.$ctr."\n";
$result.=(($ctr+1)%10 == 0 ? '
' : '');
$ctr++;
}
@@ -2394,6 +2394,7 @@ sub viewgrades_js {
}
for (i=0;i';
my $ctr = 0;
while ($ctr<=$weight{$partid}) { # display radio buttons in a nice table 10 across
- $result.= ' | \n";
+ ','.$ctr.')" />'.$ctr."\n";
$result.=(($ctr+1)%10 == 0 ? '
' : '');
$ctr++;
}
@@ -3365,13 +3369,13 @@ LISTJAVASCRIPT
$result.=''."\n".
''."\n";
- $result.=' View Problems Text: no '."\n".
- ' yes '."
\n";
+ $result.=' View Problems Text: '."\n".
+ ''."
\n";
$result.=' Submission Details: '.
- ' none'."\n".
- ' by dates and submissions'."\n".
- ' all details'."\n";
+ ''."\n".
+ ''."\n".
+ ''."\n";
$result.=''."\n".
''."\n".
@@ -3399,8 +3403,8 @@ LISTJAVASCRIPT
my ($uname,$udom) = split(/:/,$student);
$studentTable.=($ptr%2 == 1 ? '
' : '');
$studentTable.=''.$ptr.' | ';
- $studentTable.=' '
- .&nameUserString(undef,$$fullname{$student},$uname,$udom)."\n";
+ $studentTable.=' | \n";
$studentTable.=($ptr%2 == 0 ? ' |
' : '');
$ptr++;
}
@@ -3472,7 +3476,11 @@ sub displayPage {
my $navmap = Apache::lonnavmaps::navmap->new();
my ($mapUrl, $id, $resUrl)=&Apache::lonnet::decode_symb($env{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
-
+ if (!$map) {
+ $request->print('Unable to view requested sequence. ('.$resUrl.')');
+ $request->print(&show_grading_menu_form($symb,$url));
+ return;
+ }
my $iterator = $navmap->getIterator($map->map_start(),
$map->map_finish());
@@ -3678,7 +3686,12 @@ sub updateGradeByPage {
my $navmap = Apache::lonnavmaps::navmap->new();
my ($mapUrl, $id, $resUrl) = &Apache::lonnet::decode_symb( $env{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
-
+ if (!$map) {
+ $request->print('Unable to grade requested sequence. ('.$resUrl.')');
+ my ($symb,$url)=&get_symb_and_url($request);
+ $request->print(&show_grading_menu_form($symb,$url));
+ return;
+ }
my $iterator = $navmap->getIterator($map->map_start(),
$map->map_finish());
@@ -4324,7 +4337,7 @@ sub scantron_process_corrections {
}
}
if ($err) {
- $r->print("Unable to accept last correction, an error occurred :$errmsg:");
+ $r->print("Unable to accept last correction, an error occurred :$errmsg:");
} else {
&scantron_put_line($scanlines,$scan_data,$which,$line,$skip);
&scantron_putfile($scanlines,$scan_data);
@@ -5390,10 +5403,10 @@ GRADINGMENUJS
$result.='
';
- $result.=''.
+ $result.=' |
|
'."\n";
$result.=''.
- ' '.
- 'Current Resource: For all students in selected section or course |
'."\n";
+ 'Current Resource: For all students in selected section or course'."\n";
$result.=''.
- ' '.
- 'The complete set/page/sequence: For one student |
'."\n";
+ 'The complete set/page/sequence: For one student'."\n";
$result.=' '.
''.
|