'.
''.
- ' No | '.
- ' '.($ENV{'form.vProb'} eq 'no' ? 'Title' : 'Problem View').'/Grade | ';
+ ' Prob. | '.
+ ' '.($ENV{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade | ';
my ($depth,$question) = (1,1);
$iterator->next(); # skip the first BEGIN_MAP
@@ -2783,21 +2808,18 @@ sub displayPage {
if ($ENV{'form.vProb'} eq 'yes') {
$studentTable.=&show_problem($request,$symbx,$uname,$udom,1);
} else {
- my $companswer = &Apache::loncommon::get_student_answers(
- $symbx,$uname,$udom,$ENV{'request.course.id'});
+ my $companswer = &Apache::loncommon::get_student_answers($symbx,$uname,$udom,$ENV{'request.course.id'});
$companswer =~ s|||g;
-
# while ($companswer =~ /()/s) { #\n");
# }
-# $companswer =~ s///g;
+# $companswer =~ s|||g;
$studentTable.=' '.$title.' Correct answer: '.$companswer;
}
my %record = &Apache::lonnet::restore($symbx,$ENV{'request.course.id'},$udom,$uname);
-
if ($ENV{'form.lastSub'} eq 'datesub') {
if ($record{'version'} eq '') {
$studentTable.=' No recorded submission for this problem ';
@@ -2807,7 +2829,13 @@ sub displayPage {
'Date/Time | '.
'Submission | '.
'Status | ';
+ my %responseType = ();
+ foreach my $partid (@{$parts}) {
+ $responseType{$partid} = $curRes->responseType($partid);
+ }
my ($version);
+ my %mark;
+ $mark{'correct_by_student'} = $checkIcon;
for ($version=1;$version<=$record{'version'};$version++) {
my $timestamp = scalar(localtime($record{$version.':timestamp'}));
$studentTable.=''.$timestamp.' | ';
@@ -2816,17 +2844,16 @@ sub displayPage {
foreach my $partid (@{$parts}) {
my @matchKey = grep /^resource\.$partid\..*?\.submission$/,@versionKeys;
next if ($record{"$version:resource.$partid.solved"} eq '');
-# next if ($record{"$version:resource.$partid.award"} eq 'APPROX_ANS' &&
-# $record{"$version:resource.$partid.solved"} eq '');
$displaySub[0].=(exists $record{$version.':'.$matchKey[0]}) ?
'Part '.$partid.' '.
($record{"$version:resource.$partid.tries"} eq '' ? 'Trial not counted' :
'Trial '.$record{"$version:resource.$partid.tries"}).' '.
- $record{$version.':'.$matchKey[0]}.' ' : '';
+ &cleanRecord($record{$version.':'.$matchKey[0]},$responseType{$partid}).' ' : '';
$displaySub[1].=(exists $record{"$version:resource.$partid.award"}) ?
'Part '.$partid.' '.
- $record{"$version:resource.$partid.award"}.'/'.
- $record{"$version:resource.$partid.solved"}.' ' : '';
+ lc($record{"$version:resource.$partid.award"}).' '.
+ $mark{$record{"$version:resource.$partid.solved"}}.' ' : '';
+# $record{"$version:resource.$partid.solved"}.' ' : '';
$displaySub[2].=(exists $record{"$version:resource.$partid.regrader"}) ?
$record{"$version:resource.$partid.regrader"}.' (Part: '.$partid.')' : '';
}
@@ -3336,12 +3363,19 @@ sub gradingmenu {
$request->print(<
- function checkChoice(formname) {
- var cmd = formname.command;
- formname.saveState.value = "saveCmd="+radioSelection(cmd)+":saveSec="+pullDownSelection(formname.section)+
+ function checkChoice(formname,val,cmdx) {
+ if (val <= 2) {
+ var cmd = radioSelection(formname.radioChoice);
+ var cmdsave = cmd;
+ } else {
+ cmd = cmdx;
+ cmdsave = 'submission';
+ }
+ formname.command.value = cmd;
+ formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+
":saveSub="+radioSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status);
- if (cmd[0].checked || cmd[1].checked || cmd[2].checked || cmd[3].checked || cmd[4].checked) formname.submit();
- if (cmd[5].checked) {
+ if (val < 5) formname.submit();
+ if (val == 5) {
if (!checkReceiptNo(formname,'notOK')) { return false;}
formname.submit();
}
@@ -3358,60 +3392,19 @@ sub gradingmenu {
formname.receipt.focus();
return false;
}
- formname.command[5].checked = true;
return true;
}
-
- function radioSelection(radioButton) {
- var selection=null;
- if (radioButton.length > 1) {
- for (var i=0; i 1) {
- for (var i=0; i
GRADINGMENUJS
-
- my $result=' Manual Grading/View Submission'.
- ''.
- 'Problem: '.$probTitle.' | '."\n";
- my ($partlist,$handgrade) = &response_type($url);
- my ($resptype,$hdgrade)=('','no');
- for (sort keys(%$handgrade)) {
- my ($responsetype,$handgrade)=split(/:/,$$handgrade{$_});
- $resptype = $responsetype;
- $hdgrade = $handgrade if ($handgrade eq 'yes');
- $result.='Part '.(split(/_/))[0].' | '.
- 'Type: '.$responsetype.' | '.
- 'Handgrade: '.$handgrade.' | ';
- }
- $result.=' '."\n";
-
+ &commonJSfunctions($request);
+ my $result=' Manual Grading/View Submission';
+ my ($table,$resptype,$hdgrade) = &showResourceInfo($url,$probTitle);
+ $result.=$table;
my (undef,$sections) = &getclasslist('all','0');
my $savedState = &savedState();
- my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'pickStudentPage' : $$savedState{'saveCmd'});
+ my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'});
my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'});
- my $saveSub = ($$savedState{'saveSub'} eq '' ? 'yes' : $$savedState{'saveSub'});
+ my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'});
my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'});
$result.='
|