version 1.148, 2003/11/07 08:56:52
|
version 1.155, 2003/11/10 16:38:06
|
Line 132 sub response_type {
|
Line 132 sub response_type {
|
my ($url,$symb) = shift; |
my ($url,$symb) = shift; |
$symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url))) if ($symb eq ''); |
$symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url))) if ($symb eq ''); |
my $allkeys = &Apache::lonnet::metadata($url,'keys'); |
my $allkeys = &Apache::lonnet::metadata($url,'keys'); |
|
my %vPart; |
|
foreach my $partid (&Apache::loncommon::get_env_multiple('form.vPart')) { |
|
$vPart{$partid}=1; |
|
} |
my %seen = (); |
my %seen = (); |
my (@partlist,%handgrade,%responseType); |
my (@partlist,%handgrade,%responseType); |
foreach (split(/,/,&Apache::lonnet::metadata($url,'packages'))) { |
foreach (split(/,/,&Apache::lonnet::metadata($url,'packages'))) { |
Line 141 sub response_type {
|
Line 145 sub response_type {
|
if (&Apache::loncommon::check_if_partid_hidden($partid,$symb)) { |
if (&Apache::loncommon::check_if_partid_hidden($partid,$symb)) { |
next; |
next; |
} |
} |
|
if (%vPart && !exists($vPart{$partid})) { |
|
next; |
|
} |
$responsetype =~ s/response$//; # make it compatible w/ navmaps - should move to that!! |
$responsetype =~ s/response$//; # make it compatible w/ navmaps - should move to that!! |
my ($value) = &Apache::lonnet::EXT('resource.'.$part.'.handgrade',$symb); |
my ($value) = &Apache::lonnet::EXT('resource.'.$part.'.handgrade',$symb); |
$handgrade{$part} = ($value eq 'yes' ? 'yes' : 'no'); |
$handgrade{$part} = ($value eq 'yes' ? 'yes' : 'no'); |
Line 157 sub response_type {
|
Line 164 sub response_type {
|
#--- Show resource title |
#--- Show resource title |
#--- and parts and response type |
#--- and parts and response type |
sub showResourceInfo { |
sub showResourceInfo { |
my ($url,$probTitle) = @_; |
my ($url,$probTitle,$checkboxes) = @_; |
|
my $col=3; |
|
if ($checkboxes) { $col=4; } |
my $result ='<table border="0">'. |
my $result ='<table border="0">'. |
'<tr><td colspan=3><font size=+1><b>Current Resource: </b>'.$probTitle.'</font></td></tr>'."\n"; |
'<tr><td colspan="'.$col.'"><font size="+1"><b>Current Resource: </b>'. |
|
$probTitle.'</font></td></tr>'."\n"; |
my ($partlist,$handgrade,$responseType) = &response_type($url); |
my ($partlist,$handgrade,$responseType) = &response_type($url); |
my %resptype = (); |
my %resptype = (); |
my $hdgrade='no'; |
my $hdgrade='no'; |
|
my %partsseen; |
for my $part_resID (sort keys(%$handgrade)) { |
for my $part_resID (sort keys(%$handgrade)) { |
my $handgrade=$$handgrade{$part_resID}; |
my $handgrade=$$handgrade{$part_resID}; |
my ($partID,$resID) = split(/_/,$part_resID); |
my ($partID,$resID) = split(/_/,$part_resID); |
my $responsetype = $responseType->{$partID}->{$resID}; |
my $responsetype = $responseType->{$partID}->{$resID}; |
$hdgrade = $handgrade if ($handgrade eq 'yes'); |
$hdgrade = $handgrade if ($handgrade eq 'yes'); |
$result.='<tr><td><b>Part </b>'.$partID.' <font color="#999999">'. |
$result.='<tr>'; |
|
if ($checkboxes) { |
|
if (exists($partsseen{$partID})) { |
|
$result.="<td> </td>"; |
|
} else { |
|
$result.="<td><input type='checkbox' name='vPart' value='$partID' checked='on' /></td>"; |
|
} |
|
$partsseen{$partID}=1; |
|
} |
|
$result.='<td><b>Part </b>'.$partID.' <font color="#999999">'. |
$resID.'</font></td>'. |
$resID.'</font></td>'. |
'<td><b>Type: </b>'.$responsetype.'</td></tr>'; |
'<td><b>Type: </b>'.$responsetype.'</td></tr>'; |
# '<td><b>Handgrade: </b>'.$handgrade.'</td></tr>'; |
# '<td><b>Handgrade: </b>'.$handgrade.'</td></tr>'; |
Line 189 sub get_order {
|
Line 209 sub get_order {
|
('grade_courseid' => |
('grade_courseid' => |
$ENV{'request.course.id'}), |
$ENV{'request.course.id'}), |
('grade_username' => $uname)); |
('grade_username' => $uname)); |
(my $debug,$subresult)=split(/_HASH_REF__/,$subresult,2); |
(undef,$subresult)=split(/_HASH_REF__/,$subresult,2); |
Apache->request->print($debug); |
|
my %analyze=&Apache::lonnet::str2hash($subresult); |
my %analyze=&Apache::lonnet::str2hash($subresult); |
return ($analyze{"$partid.$respid.shown"}); |
return ($analyze{"$partid.$respid.shown"}); |
} |
} |
Line 551 sub listStudents {
|
Line 570 sub listStudents {
|
my $result='<h3><font color="#339933"> '.$viewgrade. |
my $result='<h3><font color="#339933"> '.$viewgrade. |
' Submissions for a Student or a Group of Students</font></h3>'; |
' Submissions for a Student or a Group of Students</font></h3>'; |
|
|
my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($url,$ENV{'form.probTitle'}); |
my ($table,undef,$hdgrade,$partlist,$handgrade) = &showResourceInfo($url,$ENV{'form.probTitle'},($ENV{'form.showgrading'} eq 'yes')); |
$result.=$table; |
|
|
|
$request->print(<<LISTJAVASCRIPT); |
$request->print(<<LISTJAVASCRIPT); |
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
Line 592 LISTJAVASCRIPT
|
Line 610 LISTJAVASCRIPT
|
|
|
my $checkhdgrade = ($ENV{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked' : ''; |
my $checkhdgrade = ($ENV{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked' : ''; |
my $checklastsub = $checkhdgrade eq '' ? 'checked' : ''; |
my $checklastsub = $checkhdgrade eq '' ? 'checked' : ''; |
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'."\n". |
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'. |
|
"\n".$table. |
' <b>View Problem Text: </b><input type="radio" name="vProb" value="no" checked="on" /> no '."\n". |
' <b>View Problem Text: </b><input type="radio" name="vProb" value="no" checked="on" /> no '."\n". |
'<input type="radio" name="vProb" value="yes" /> one student '."\n". |
'<input type="radio" name="vProb" value="yes" /> one student '."\n". |
'<input type="radio" name="vProb" value="all" /> all students <br />'."\n". |
'<input type="radio" name="vProb" value="all" /> all students <br />'."\n". |
Line 666 LISTJAVASCRIPT
|
Line 685 LISTJAVASCRIPT
|
my ($foo,$partid,$foo1) = split(/\./,$_); |
my ($foo,$partid,$foo1) = split(/\./,$_); |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
$submitted = 0; |
$submitted = 0; |
|
my ($part)=split(/\./,$partid); |
$gradeTable.='<input type="hidden" name="'. |
$gradeTable.='<input type="hidden" name="'. |
$student.':submitted_by" value="'. |
$student.':'.$part.':submitted_by" value="'. |
$status{'resource.'.$partid.'.submitted_by'}.'" />'; |
$status{'resource.'.$partid.'.submitted_by'}.'" />'; |
} |
} |
} |
} |
Line 729 LISTJAVASCRIPT
|
Line 749 LISTJAVASCRIPT
|
sub processGroup { |
sub processGroup { |
my ($request) = shift; |
my ($request) = shift; |
my $ctr = 0; |
my $ctr = 0; |
my @stuchecked = (ref($ENV{'form.stuinfo'}) ? @{$ENV{'form.stuinfo'}} |
my @stuchecked = &Apache::loncommon::get_env_multiple('form.stuinfo'); |
: ($ENV{'form.stuinfo'})); |
|
my $total = scalar(@stuchecked)-1; |
my $total = scalar(@stuchecked)-1; |
|
|
foreach (@stuchecked) { |
foreach (@stuchecked) { |
Line 1435 sub submission {
|
Line 1454 sub submission {
|
'<input type="hidden" name="msgsub" value="'.$ENV{'form.msgsub'}.'" />'."\n". |
'<input type="hidden" name="msgsub" value="'.$ENV{'form.msgsub'}.'" />'."\n". |
'<input type="hidden" name="shownSub" value="0" />'."\n". |
'<input type="hidden" name="shownSub" value="0" />'."\n". |
'<input type="hidden" name="savemsgN" value="'.$ENV{'form.savemsgN'}.'" />'."\n"); |
'<input type="hidden" name="savemsgN" value="'.$ENV{'form.savemsgN'}.'" />'."\n"); |
|
foreach my $partid (&Apache::loncommon::get_env_multiple('form.vPart')) { |
|
$request->print('<input type="hidden" name="vPart" value="'.$partid.'" />'."\n"); |
|
} |
} |
} |
|
|
my ($cts,$prnmsg) = (1,''); |
my ($cts,$prnmsg) = (1,''); |
Line 1533 KEYWORDS
|
Line 1555 KEYWORDS
|
$result.=$$fullname{$_}.' '; |
$result.=$$fullname{$_}.' '; |
} |
} |
$result.='<br />'."\n"; |
$result.='<br />'."\n"; |
|
my ($part)=split(/\./,$_); |
$result.='<input type="hidden" name="collaborator'.$counter. |
$result.='<input type="hidden" name="collaborator'.$counter. |
'" value="'.(join ':',@goodcollaborators).'" />'."\n"; |
'" value="'.$part.':'.(join ':',@goodcollaborators).'" />'. |
|
"\n"; |
} |
} |
if (scalar(@badcollaborators) > 0) { |
if (scalar(@badcollaborators) > 0) { |
$result.='<table border="0"><tr bgcolor="#ffbbbb"><td>'; |
$result.='<table border="0"><tr bgcolor="#ffbbbb"><td>'; |
Line 1560 KEYWORDS
|
Line 1584 KEYWORDS
|
# (3) Last submission plus the parts info |
# (3) Last submission plus the parts info |
# (4) The whole record for this student |
# (4) The whole record for this student |
if ($ENV{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) { |
if ($ENV{'form.lastSub'} =~ /^(lastonly|hdgrade)$/) { |
if ($ENV{'form.'.$uname.':'.$udom.':submitted_by'}) { |
my ($string,$timestamp)= &get_last_submission(\%record); |
my $submitby=''. |
my $lastsubonly=''. |
'<b>Collaborative submission by: </b>'. |
($$timestamp eq '' ? '' : '<b>Date Submitted:</b> '. |
'<a href="javascript:viewSubmitter(\''. |
$$timestamp)."</td></tr>\n"; |
$ENV{'form.'.$uname.':'.$udom.':submitted_by'}. |
if ($$timestamp eq '') { |
'\')"; TARGET=_self>'. |
$lastsubonly.='<tr><td bgcolor="#ffffe6">'.$$string[0]; |
$$fullname{$ENV{'form.'.$uname.':'.$udom.':submitted_by'}}.'</a>'; |
|
$request->print($submitby); |
|
} else { |
} else { |
my ($string,$timestamp)= &get_last_submission(\%record); |
my %seenparts; |
my $lastsubonly=''. |
for my $part (sort keys(%$handgrade)) { |
($$timestamp eq '' ? '' : '<b>Date Submitted:</b> '. |
my ($partid,$respid) = split(/_/,$part); |
$$timestamp)."</td></tr>\n"; |
if ($ENV{"form.$uname:$udom:$partid:submitted_by"}) { |
if ($$timestamp eq '') { |
if (exists($seenparts{$partid})) { next; } |
$lastsubonly.='<tr><td bgcolor="#ffffe6">'.$$string[0]; |
$seenparts{$partid}=1; |
} else { |
my $submitby='<b>Part '.$partid. |
for my $part (sort keys(%$handgrade)) { |
' Collaborative submission by: </b>'. |
my ($partid,$respid) = split(/_/,$part); |
'<a href="javascript:viewSubmitter(\''. |
my $responsetype = $responseType->{$partid}->{$respid}; |
$ENV{"form.$uname:$udom:$partid:submitted_by"}. |
if (!exists($record{'resource.'.$partid.'.'.$respid.'.submission'})) { |
'\')"; TARGET=_self>'. |
|
$$fullname{$ENV{"form.$uname:$udom:$partid:submitted_by"}}.'</a><br />'; |
|
$request->print($submitby); |
|
next; |
|
} |
|
my $responsetype = $responseType->{$partid}->{$respid}; |
|
if (!exists($record{"resource.$partid.$respid.submission"})) { |
|
$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '. |
|
$partid.'</b> <font color="#999999">( ID '.$respid. |
|
' )</font> '. |
|
'<font color="red">Nothing submitted - no attempts</font><br /><br />'; |
|
next; |
|
} |
|
foreach (@$string) { |
|
my ($partid,$respid) = /^resource\.([^\.]*)\.([^\.]*)\.submission/; |
|
if ($part ne ($partid.'_'.$respid)) { next; } |
|
my ($ressub,$subval) = split(/:/,$_,2); |
|
# Similarity check |
|
my $similar=''; |
|
if($ENV{'form.checkPlag'}){ |
|
my ($oname,$odom,$ocrsid,$oessay,$osim)= |
|
&most_similar($uname,$udom,$subval); |
|
if ($osim) { |
|
$osim=int($osim*100.0); |
|
$similar="<hr /><h3><font color=\"#FF0000\">Essay". |
|
" is $osim% similar to an essay by ". |
|
&Apache::loncommon::plainname($oname,$odom). |
|
'</font></h3><blockquote><i>'. |
|
&keywords_highlight($oessay). |
|
'</i></blockquote><hr />'; |
|
} |
|
} |
|
my $order=&get_order($partid,$respid,$symb,$uname,$udom); |
|
if ($ENV{'form.lastSub'} eq 'lastonly' || |
|
($ENV{'form.lastSub'} eq 'hdgrade' && |
|
$$handgrade{$part} eq 'yes')) { |
$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '. |
$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '. |
$partid.'</b> <font color="#999999">( ID '.$respid. |
$partid.'</b> <font color="#999999">( ID '.$respid. |
' )</font> '. |
' )</font> '; |
'<font color="red">Nothing submitted - no attempts</font><br /><br />'; |
if ($record{"resource.$partid.$respid.uploadedurl"}) { |
} else { |
$lastsubonly.='<a href="'.&Apache::lonnet::tokenwrapper($record{"resource.$partid.$respid.uploadedurl"}).'"><img src="/adm/lonIcons/unknown.gif" border=0"> File uploaded by student</a> <font color="red" size="1">Like all files provided by users, this file may contain virusses</font><br />'; |
foreach (@$string) { |
|
my ($partid,$respid) = /^resource\.([^\.]*)\.([^\.]*)\.submission/; |
|
if ($part eq ($partid.'_'.$respid)) { |
|
my ($ressub,$subval) = split(/:/,$_,2); |
|
# Similarity check |
|
my $similar=''; |
|
my $oname; |
|
my $odom; |
|
my $ocrsid; |
|
my $oessay; |
|
my $osim; |
|
if($ENV{'form.checkPlag'}){ |
|
($oname,$odom,$ocrsid,$oessay,$osim)=&most_similar($uname,$udom,$subval); |
|
if ($osim) { |
|
$osim=int($osim*100.0); |
|
$similar='<hr /><h3><font color="#FF0000">Essay is '.$osim. |
|
'% similar to an essay by '.&Apache::loncommon::plainname($oname,$odom). |
|
'</font></h3><blockquote><i>'. |
|
&keywords_highlight($oessay).'</i></blockquote><hr />'; |
|
} |
|
} |
|
my $order=&get_order($partid,$respid,$symb,$uname,$udom); |
|
$lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '. |
|
$partid.'</b> <font color="#999999">( ID '.$respid. |
|
' )</font> '. |
|
($record{"resource.$partid.$respid.uploadedurl"}? |
|
'<a href="'. |
|
&Apache::lonnet::tokenwrapper($record{"resource.$partid.$respid.uploadedurl"}). |
|
'"><img src="/adm/lonIcons/unknown.gif" border=0"> File uploaded by student</a> '. |
|
'<font color="red" size="1">Like all files provided by users, '. |
|
'this file may contain virusses</font><br />':''). |
|
'<b>Submitted Answer: </b>'. |
|
&cleanRecord($subval,$responsetype,$symb,$partid,$respid,\%record,$order). |
|
'<br /><br />'.$similar."\n" |
|
if ($ENV{'form.lastSub'} eq 'lastonly' || |
|
($ENV{'form.lastSub'} eq 'hdgrade' && |
|
$$handgrade{$part} =~ /:yes$/)); |
|
} |
|
} |
} |
|
$lastsubonly.='<b>Submitted Answer: </b>'. |
|
&cleanRecord($subval,$responsetype,$symb,$partid, |
|
$respid,\%record,$order); |
|
if ($similar) {$lastsubonly.="<br /><br />$similar\n";} |
} |
} |
} |
} |
} |
} |
$lastsubonly.='</td></tr><tr bgcolor="#ffffff"><td>'."\n"; |
|
$request->print($lastsubonly); |
|
} |
} |
|
$lastsubonly.='</td></tr><tr bgcolor="#ffffff"><td>'."\n"; |
|
$request->print($lastsubonly); |
} elsif ($ENV{'form.lastSub'} eq 'datesub') { |
} elsif ($ENV{'form.lastSub'} eq 'datesub') { |
my (undef,$responseType,undef,$parts) = &showResourceInfo($url); |
my (undef,$responseType,undef,$parts) = &showResourceInfo($url); |
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); |
$request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); |
Line 1805 sub processHandGrade {
|
Line 1828 sub processHandGrade {
|
$ENV{'form.msgsub'},$message); |
$ENV{'form.msgsub'},$message); |
} |
} |
if ($ENV{'form.collaborator'.$ctr}) { |
if ($ENV{'form.collaborator'.$ctr}) { |
my (@collaborators) = split(/:/,$ENV{'form.collaborator'.$ctr}); |
my @collabstrs=&Apache::loncommon::get_env_multiple("form.collaborator$ctr"); |
foreach (@collaborators) { |
foreach my $collabstr (@collabstrs) { |
my ($errorflag,$pts,$wgt) = |
my ($part,@collaborators) = split(/:/,$collabstr); |
&saveHandGrade($request,$url,$symb,$_,$udom,$ctr,$ENV{'form.unamedom'.$ctr}); |
foreach (@collaborators) { |
if ($errorflag eq 'not_allowed') { |
my ($errorflag,$pts,$wgt) = |
$request->print("<font color=\"red\">Not allowed to modify grades for $_:$udom</font>"); |
&saveHandGrade($request,$url,$symb,$_,$udom,$ctr, |
next; |
$ENV{'form.unamedom'.$ctr},$part); |
} else { |
if ($errorflag eq 'not_allowed') { |
if ($message ne '') { |
$request->print("<font color=\"red\">Not allowed to modify grades for $_:$udom</font>"); |
$msgstatus = &Apache::lonmsg::user_normal_msg ($_,$udom, |
next; |
$ENV{'form.msgsub'}, |
} else { |
$message); |
if ($message ne '') { |
|
$msgstatus = &Apache::lonmsg::user_normal_msg($_,$udom,$ENV{'form.msgsub'},$message); |
|
} |
|
|
} |
} |
} |
} |
} |
} |
Line 1968 sub processHandGrade {
|
Line 1994 sub processHandGrade {
|
|
|
#---- Save the score and award for each student, if changed |
#---- Save the score and award for each student, if changed |
sub saveHandGrade { |
sub saveHandGrade { |
my ($request,$url,$symb,$stuname,$domain,$newflg,$submitter) = @_; |
my ($request,$url,$symb,$stuname,$domain,$newflg,$submitter,$part) = @_; |
my $usec = &Apache::lonnet::getsection($domain,$stuname, |
my $usec = &Apache::lonnet::getsection($domain,$stuname, |
$ENV{'request.course.id'}); |
$ENV{'request.course.id'}); |
if (!&canmodify($usec)) { return('not_allowed'); } |
if (!&canmodify($usec)) { return('not_allowed'); } |
Line 1976 sub saveHandGrade {
|
Line 2002 sub saveHandGrade {
|
my %newrecord = (); |
my %newrecord = (); |
my ($pts,$wgt) = ('',''); |
my ($pts,$wgt) = ('',''); |
foreach (split(/:/,$ENV{'form.partlist'.$newflg})) { |
foreach (split(/:/,$ENV{'form.partlist'.$newflg})) { |
|
#collaborator may vary for different parts |
|
if ($submitter && $_ ne $part) { next; } |
my $dropMenu = $ENV{'form.GD_SEL'.$newflg.'_'.$_}; |
my $dropMenu = $ENV{'form.GD_SEL'.$newflg.'_'.$_}; |
if ($dropMenu eq 'excused') { |
if ($dropMenu eq 'excused') { |
if ($record{'resource.'.$_.'.solved'} ne 'excused') { |
if ($record{'resource.'.$_.'.solved'} ne 'excused') { |
Line 1996 sub saveHandGrade {
|
Line 2024 sub saveHandGrade {
|
$pts = ($ENV{'form.GD_BOX'.$newflg.'_'.$_} ne '' ? |
$pts = ($ENV{'form.GD_BOX'.$newflg.'_'.$_} ne '' ? |
$ENV{'form.GD_BOX'.$newflg.'_'.$_} : |
$ENV{'form.GD_BOX'.$newflg.'_'.$_} : |
$ENV{'form.RADVAL'.$newflg.'_'.$_}); |
$ENV{'form.RADVAL'.$newflg.'_'.$_}); |
return 'no_score' if ($pts eq '' && $ENV{'form.GD_SEL'.$newflg.'_'.$_} eq ''); |
if ($pts eq '' && $ENV{'form.GD_SEL'.$newflg.'_'.$_} eq '') { |
|
next; |
|
} |
$wgt = $ENV{'form.WGT'.$newflg.'_'.$_} eq '' ? 1 : |
$wgt = $ENV{'form.WGT'.$newflg.'_'.$_} eq '' ? 1 : |
$ENV{'form.WGT'.$newflg.'_'.$_}; |
$ENV{'form.WGT'.$newflg.'_'.$_}; |
my $partial= $pts/$wgt; |
my $partial= $pts/$wgt; |
next if ($partial eq $record{'resource.'.$_.'.awarded'}); #do not update score for part if not changed. |
if ($partial eq $record{'resource.'.$_.'.awarded'}) { |
$newrecord{'resource.'.$_.'.awarded'} = $partial |
#do not update score for part if not changed. |
if ($record{'resource.'.$_.'.awarded'} ne $partial); |
next; |
|
} |
|
if ($record{'resource.'.$_.'.awarded'} ne $partial) { |
|
$newrecord{'resource.'.$_.'.awarded'} = $partial; |
|
} |
my $reckey = 'resource.'.$_.'.solved'; |
my $reckey = 'resource.'.$_.'.solved'; |
if ($partial == 0) { |
if ($partial == 0) { |
$newrecord{$reckey} = 'incorrect_by_override' |
if ($record{$reckey} ne 'incorrect_by_override') { |
if ($record{$reckey} ne 'incorrect_by_override'); |
$newrecord{$reckey} = 'incorrect_by_override'; |
|
} |
} else { |
} else { |
$newrecord{$reckey} = 'correct_by_override' |
if ($record{$reckey} ne 'correct_by_override') { |
if ($record{$reckey} ne 'correct_by_override'); |
$newrecord{$reckey} = 'correct_by_override'; |
|
} |
|
} |
|
if ($submitter && |
|
($record{'resource.'.$_.'.submitted_by'} ne $submitter)) { |
|
$newrecord{'resource.'.$_.'.submitted_by'} = $submitter; |
} |
} |
$newrecord{'resource.'.$_.'.submitted_by'} = $submitter |
$newrecord{'resource.'.$_.'.regrader'}= |
if ($submitter && ($record{'resource.'.$_.'.submitted_by'} ne $submitter)); |
"$ENV{'user.name'}:$ENV{'user.domain'}"; |
$newrecord{'resource.'.$_.'.regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}"; |
|
} |
} |
} |
} |
|
|
if (scalar(keys(%newrecord)) > 0) { |
if (scalar(keys(%newrecord)) > 0) { |
&Apache::lonnet::cstore(\%newrecord,$symb, |
&Apache::lonnet::cstore(\%newrecord,$symb, |
$ENV{'request.course.id'},$domain,$stuname); |
$ENV{'request.course.id'},$domain,$stuname); |
Line 3740 GRADINGMENUJS
|
Line 3778 GRADINGMENUJS
|
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
' Select Section: <select name="section">'."\n"; |
' Select Section: <select name="section">'."\n"; |
if (ref($sections)) { |
if (ref($sections)) { |
foreach (sort (@$sections)) {$result.='<option value="'.$_.'" '. |
foreach (sort (@$sections)) { |
($saveSec eq $_ ? 'selected="on"' : '').'>'.$_.'</option>'."\n";} |
$result.='<option value="'.$_.'" '. |
|
($saveSec eq $_ ? 'selected="on"':'').'>'.$_.'</option>'."\n"; |
|
} |
} |
} |
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="on"' : ''). '>all</select> '; |
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="on"' : ''). '>all</select> '; |
|
|
$result.='Student Status:</b>'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef); |
$result.='Student Status:</b>'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef); |
|
|
if (ref($sections)) { |
if (ref($sections) && (grep /no/,@$sections)) { |
$result.=' (Section "no" implies the students were not assigned a section.)<br />' |
$result.=' (Section "no" implies the students were not assigned a section.)<br />'; |
if (grep /no/,@$sections); |
|
} |
} |
$result.='</td></tr>'; |
$result.='</td></tr>'; |
|
|