version 1.76, 2003/03/24 21:03:54
|
version 1.81, 2003/03/28 23:44:31
|
Line 125 sub getclasslist {
|
Line 125 sub getclasslist {
|
my (undef,undef,$end,$start,$id,$section,$fullname,$status)= |
my (undef,undef,$end,$start,$id,$section,$fullname,$status)= |
@{$classlist->{$_}}; |
@{$classlist->{$_}}; |
# filter students according to status selected |
# filter students according to status selected |
if ($filterlist && $ENV{'form.saveStatus'} ne 'Any') { |
if ($filterlist && $ENV{'form.status'} ne 'Any') { |
if ($ENV{'form.saveStatus'} ne $status) { |
if ($ENV{'form.status'} ne $status) { |
delete ($classlist->{$_}); |
delete ($classlist->{$_}); |
next; |
next; |
} |
} |
Line 211 sub jscriptNform {
|
Line 211 sub jscriptNform {
|
$jscript.= '<form action="/adm/grades" method="post" name="onestudent">'."\n". |
$jscript.= '<form action="/adm/grades" method="post" name="onestudent">'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="command" value="submission" />'."\n". |
'<input type="hidden" name="command" value="submission" />'."\n". |
'<input type="hidden" name="student" value="" />'."\n". |
'<input type="hidden" name="student" value="" />'."\n". |
Line 301 sub listStudents {
|
Line 298 sub listStudents {
|
'<td><b>Type: </b>'.$responsetype.'</td>'. |
'<td><b>Type: </b>'.$responsetype.'</td>'. |
'<td><b>Handgrade: </b>'.$handgrade.'</font></td></tr>'; |
'<td><b>Handgrade: </b>'.$handgrade.'</font></td></tr>'; |
} |
} |
$result.='</table>'; |
$result.='</table>'."\n"; |
|
|
my $viewgrade = $ENV{'form.handgrade'} eq 'yes' ? 'View/Grade' : 'View'; |
my $viewgrade = $ENV{'form.handgrade'} eq 'yes' ? 'View/Grade' : 'View'; |
$ENV{'form.probTitle'} = $ENV{'form.probTitle'} eq '' ? |
$ENV{'form.probTitle'} = $ENV{'form.probTitle'} eq '' ? |
Line 346 LISTJAVASCRIPT
|
Line 343 LISTJAVASCRIPT
|
my $checklastsub = $ENV{'form.handgrade'} eq 'yes' ? '' : 'checked'; |
my $checklastsub = $ENV{'form.handgrade'} eq 'yes' ? '' : 'checked'; |
|
|
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'."\n". |
my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'."\n". |
' <b>View Problem: </b><input type="radio" name="vProb" value="no" /> no '."\n". |
' <b>View Problem: </b><input type="radio" name="vProb" value="no" checked /> no '."\n". |
'<input type="radio" name="vProb" value="yes" checked /> 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". |
' <b>Submissions: </b>'."\n"; |
' <b>Submissions: </b>'."\n"; |
if ($ENV{'form.handgrade'} eq 'yes') { |
if ($ENV{'form.handgrade'} eq 'yes') { |
Line 361 LISTJAVASCRIPT
|
Line 358 LISTJAVASCRIPT
|
'<input type="hidden" name="response" value="'.$ENV{'form.response'}.'" />'."\n". |
'<input type="hidden" name="response" value="'.$ENV{'form.response'}.'" />'."\n". |
'<input type="hidden" name="handgrade" value="'.$ENV{'form.handgrade'}.'" /><br />'."\n". |
'<input type="hidden" name="handgrade" value="'.$ENV{'form.handgrade'}.'" /><br />'."\n". |
'<input type="hidden" name="showgrading" value="'.$ENV{'form.showgrading'}.'" /><br />'."\n". |
'<input type="hidden" name="showgrading" value="'.$ENV{'form.showgrading'}.'" /><br />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
Line 634 SUBJAVASCRIPT
|
Line 628 SUBJAVASCRIPT
|
#--- javascript for essay type problem -- |
#--- javascript for essay type problem -- |
sub sub_page_kw_js { |
sub sub_page_kw_js { |
my $request = shift; |
my $request = shift; |
|
my $iconpath = $request->dir_config('lonIconsURL'); |
$request->print(<<SUBJAVASCRIPT); |
$request->print(<<SUBJAVASCRIPT); |
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
|
|
Line 681 sub sub_page_kw_js {
|
Line 676 sub sub_page_kw_js {
|
} |
} |
|
|
//====================== Script for composing message ============== |
//====================== Script for composing message ============== |
|
// preload images |
|
img1 = new Image(); |
|
img1.src = "$iconpath/mailbkgrd.gif"; |
|
img2 = new Image(); |
|
img2.src = "$iconpath/mailto.gif"; |
|
|
function msgCenter(msgform,usrctr,fullname) { |
function msgCenter(msgform,usrctr,fullname) { |
var Nmsg = msgform.savemsgN.value; |
var Nmsg = msgform.savemsgN.value; |
savedMsgHeader(Nmsg,usrctr,fullname); |
savedMsgHeader(Nmsg,usrctr,fullname); |
Line 735 sub sub_page_kw_js {
|
Line 736 sub sub_page_kw_js {
|
pDoc.write(" if (document.msgcenter.subchk.checked) {"); |
pDoc.write(" if (document.msgcenter.subchk.checked) {"); |
pDoc.write(" msgchk = \\"msgsub,\\";"); |
pDoc.write(" msgchk = \\"msgsub,\\";"); |
pDoc.write(" }"); |
pDoc.write(" }"); |
pDoc.write( "for (var i=1; i<=nmsg; i++) {"); |
pDoc.write(" var includemsg = 0;"); |
|
pDoc.write(" for (var i=1; i<=nmsg; i++) {"); |
pDoc.write(" var opnmsg = eval(\\"opener.document.SCORE.savemsg\\"+i);"); |
pDoc.write(" var opnmsg = eval(\\"opener.document.SCORE.savemsg\\"+i);"); |
pDoc.write(" var frmmsg = eval(\\"document.msgcenter.msg\\"+i);"); |
pDoc.write(" var frmmsg = eval(\\"document.msgcenter.msg\\"+i);"); |
pDoc.write(" opnmsg.value = frmmsg.value;"); |
pDoc.write(" opnmsg.value = frmmsg.value;"); |
pDoc.write(" var chkbox = eval(\\"document.msgcenter.msgn\\"+i);"); |
pDoc.write(" var chkbox = eval(\\"document.msgcenter.msgn\\"+i);"); |
pDoc.write(" if (chkbox.checked) {"); |
pDoc.write(" if (chkbox.checked) {"); |
pDoc.write(" msgchk += \\"savemsg\\"+i+\\",\\";"); |
pDoc.write(" msgchk += \\"savemsg\\"+i+\\",\\";"); |
|
pDoc.write(" includemsg = 1;"); |
pDoc.write(" }"); |
pDoc.write(" }"); |
pDoc.write(" }"); |
pDoc.write(" }"); |
pDoc.write(" if (document.msgcenter.newmsgchk.checked) {"); |
pDoc.write(" if (document.msgcenter.newmsgchk.checked) {"); |
pDoc.write(" msgchk += \\"newmsg\\"+usrctr;"); |
pDoc.write(" msgchk += \\"newmsg\\"+usrctr;"); |
|
pDoc.write(" includemsg = 1;"); |
|
pDoc.write(" }"); |
|
pDoc.write(" imgformname = eval(\\"opener.document.SCORE.mailicon\\"+usrctr);"); |
|
pDoc.write(" if (includemsg) {"); |
|
pDoc.write(" imgformname.src = \\"$iconpath/mailto.gif\\";"); |
|
pDoc.write(" } else {"); |
|
pDoc.write(" imgformname.src = \\"$iconpath/mailbkgrd.gif\\";"); |
pDoc.write(" }"); |
pDoc.write(" }"); |
pDoc.write(" var includemsg = eval(\\"opener.document.SCORE.includemsg\\"+usrctr);"); |
pDoc.write(" var includemsg = eval(\\"opener.document.SCORE.includemsg\\"+usrctr);"); |
pDoc.write(" includemsg.value = msgchk;"); |
pDoc.write(" includemsg.value = msgchk;"); |
Line 1036 sub submission {
|
Line 1046 sub submission {
|
|
|
$request->print('<form action="/adm/grades" method="post" name="SCORE">'."\n". |
$request->print('<form action="/adm/grades" method="post" name="SCORE">'."\n". |
'<input type="hidden" name="command" value="handgrade" />'."\n". |
'<input type="hidden" name="command" value="handgrade" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n". |
'<input type="hidden" name="refresh" value="off" />'."\n". |
'<input type="hidden" name="refresh" value="off" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
Line 1063 sub submission {
|
Line 1070 sub submission {
|
my ($cts,$prnmsg) = (1,''); |
my ($cts,$prnmsg) = (1,''); |
while ($cts <= $ENV{'form.savemsgN'}) { |
while ($cts <= $ENV{'form.savemsgN'}) { |
$prnmsg.='<input type="hidden" name="savemsg'.$cts.'" value="'. |
$prnmsg.='<input type="hidden" name="savemsg'.$cts.'" value="'. |
($keyhash{$symb.'_savemsg'.$cts} eq '' ? $ENV{'form.savemsg'.$cts} : $keyhash{$symb.'_savemsg'.$cts}). |
($keyhash{$symb.'_savemsg'.$cts} eq '' ? |
|
&Apache::lonfeedback::clear_out_html($ENV{'form.savemsg'.$cts}) : |
|
&Apache::lonfeedback::clear_out_html($keyhash{$symb.'_savemsg'.$cts})). |
'" />'."\n"; |
'" />'."\n"; |
$cts++; |
$cts++; |
} |
} |
Line 1104 KEYWORDS
|
Line 1113 KEYWORDS
|
my ($classlist,$fullname); |
my ($classlist,$fullname); |
if ($ENV{'form.handgrade'} eq 'yes') { |
if ($ENV{'form.handgrade'} eq 'yes') { |
my @col_list; |
my @col_list; |
($classlist,undef,$fullname) = &getclasslist('all',$ENV{'form.showgrading'} eq 'yes' ? '1' : '0'); |
($classlist,undef,$fullname) = &getclasslist('all','0'); |
for (keys (%$handgrade)) { |
for (keys (%$handgrade)) { |
my $ncol = &Apache::lonnet::EXT('resource.'.$_. |
my $ncol = &Apache::lonnet::EXT('resource.'.$_. |
'.maxcollaborators', |
'.maxcollaborators', |
Line 1112 KEYWORDS
|
Line 1121 KEYWORDS
|
next if ($ncol <= 0); |
next if ($ncol <= 0); |
s/\_/\./g; |
s/\_/\./g; |
next if ($record{'resource.'.$_.'.collaborators'} eq ''); |
next if ($record{'resource.'.$_.'.collaborators'} eq ''); |
my (@collaborators) = split(/,?\s+/, |
my (@colList) = split(/,?\s+/, |
$record{'resource.'.$_.'.collaborators'}); |
$record{'resource.'.$_.'.collaborators'}); |
|
my @collaborators = (); |
|
foreach (@colList) { #pre-filter list - throw out submitter |
|
my ($co_name,$co_dom) = split /\@|:/,$_; |
|
$co_dom = $udom if (! defined($co_dom)); |
|
next if ($co_name eq $uname && $co_dom eq $udom); |
|
push @collaborators, $_; |
|
} |
my (@badcollaborators); |
my (@badcollaborators); |
if (scalar(@collaborators) != 0) { |
if (scalar(@collaborators) != 0) { |
$result.='<b>Collaborators: </b>'; |
$result.='<b>Collaborators: </b>'; |
foreach my $collaborator (@collaborators) { |
foreach my $collaborator (@collaborators) { |
my ($co_name,$co_dom) = split /\@|:/,$collaborator; |
my ($co_name,$co_dom) = split /\@|:/,$collaborator; |
$co_dom = $udom if (! defined($co_dom)); |
$co_dom = $udom if (! defined($co_dom)); |
next if ($co_name eq $uname && $co_dom eq $udom); |
|
# Doing this grep allows 'fuzzy' specification |
# Doing this grep allows 'fuzzy' specification |
my @Matches = grep /^$co_name:$co_dom/i, |
my @Matches = grep /^$co_name:$co_dom$/i, |
keys %$classlist; |
keys %$classlist; |
if (! scalar(@Matches)) { |
if (! scalar(@Matches)) { |
push @badcollaborators,$collaborator; |
push @badcollaborators,':'.$collaborator.':'; |
next; |
next; |
} |
} |
push @col_list, @Matches; |
push @col_list, @Matches; |
Line 1145 KEYWORDS
|
Line 1160 KEYWORDS
|
$result .= 'invalid collaborators'; |
$result .= 'invalid collaborators'; |
} |
} |
$result .= ': '.join(', ',@badcollaborators); |
$result .= ': '.join(', ',@badcollaborators); |
|
$result .= '</td></tr></table>'; |
} |
} |
if (scalar(@collaborators > $ncol)) { |
if (scalar(@collaborators > $ncol)) { |
$result .= '<table border="0"><tr bgcolor="#ffbbbb"><td>'; |
$result .= '<table border="0"><tr bgcolor="#ffbbbb"><td>'; |
Line 1238 KEYWORDS
|
Line 1253 KEYWORDS
|
$result.='<tr><td bgcolor="#ffffff">'."\n". |
$result.='<tr><td bgcolor="#ffffff">'."\n". |
' <a href="javascript:msgCenter(document.SCORE,'.$counter. |
' <a href="javascript:msgCenter(document.SCORE,'.$counter. |
',\''.$msgfor.'\')"; TARGET=_self>'. |
',\''.$msgfor.'\')"; TARGET=_self>'. |
'Compose Message to student'.(scalar(@col_fullnames) >= 1 ? 's' : '').'</a>'. |
'Compose Message to student'.(scalar(@col_fullnames) >= 1 ? 's' : '').'</a> '. |
|
'<img src="'.$request->dir_config('lonIconsURL'). |
|
'/mailbkgrd.gif" width="14" height="10" name="mailicon'.$counter.'" />'."\n". |
'<br /> (Message will be sent when you click on Save & Next below.)'."\n" |
'<br /> (Message will be sent when you click on Save & Next below.)'."\n" |
if ($ENV{'form.handgrade'} eq 'yes'); |
if ($ENV{'form.handgrade'} eq 'yes'); |
$request->print($result); |
$request->print($result); |
Line 1352 sub processHandGrade {
|
Line 1369 sub processHandGrade {
|
my $ctr = 0; |
my $ctr = 0; |
while ($ctr < $ngrade) { |
while ($ctr < $ngrade) { |
my ($uname,$udom) = split(/:/,$ENV{'form.unamedom'.$ctr}); |
my ($uname,$udom) = split(/:/,$ENV{'form.unamedom'.$ctr}); |
my ($errorflag) = &saveHandGrade($request,$url,$symb,$uname,$udom,$ctr); |
my ($errorflag,$pts,$wgt) = &saveHandGrade($request,$url,$symb,$uname,$udom,$ctr); |
if ($errorflag eq 'no_score') { |
if ($errorflag eq 'no_score') { |
$ctr++; |
$ctr++; |
next; |
next; |
} |
} |
|
|
my $includemsg = $ENV{'form.includemsg'.$ctr}; |
my $includemsg = $ENV{'form.includemsg'.$ctr}; |
my ($subject,$message,$msgstatus) = ('','',''); |
my ($subject,$message,$msgstatus) = ('','',''); |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
Line 1366 sub processHandGrade {
|
Line 1382 sub processHandGrade {
|
foreach (@msgnum) { |
foreach (@msgnum) { |
$message.=$ENV{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
$message.=$ENV{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
} |
} |
#$message =~ s/\s+/ /g; |
$message =&Apache::lonfeedback::clear_out_html($message); |
|
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt; |
|
$message.=" for <a href=\"". |
|
&Apache::lonnet::clutter($url). |
|
"?symb=$symb\">$ENV{'form.probTitle'}</a>"; |
$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom, |
$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom, |
$ENV{'form.msgsub'},$message); |
$ENV{'form.msgsub'},$message); |
} |
} |
Line 1504 sub processHandGrade {
|
Line 1524 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) = @_; |
my %record=&Apache::lonnet::restore($symb,$ENV{'request.course.id'},$domain,$stuname); |
my %record = &Apache::lonnet::restore($symb,$ENV{'request.course.id'},$domain,$stuname); |
my %newrecord; |
my %newrecord = (); |
|
my ($pts,$wgt) = ('',''); |
foreach (split(/:/,$ENV{'form.partlist'.$newflg})) { |
foreach (split(/:/,$ENV{'form.partlist'.$newflg})) { |
if ($ENV{'form.GD_SEL'.$newflg.'_'.$_} eq 'excused') { |
if ($ENV{'form.GD_SEL'.$newflg.'_'.$_} eq 'excused') { |
if ($record{'resource.'.$_.'.solved'} ne 'excused') { |
if ($record{'resource.'.$_.'.solved'} ne 'excused') { |
Line 1515 sub saveHandGrade {
|
Line 1536 sub saveHandGrade {
|
} |
} |
} |
} |
} else { |
} else { |
my $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 ''); |
return 'no_score' if ($pts eq '' && $ENV{'form.GD_SEL'.$newflg.'_'.$_} eq ''); |
my $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; |
$newrecord{'resource.'.$_.'.awarded'} = $partial |
$newrecord{'resource.'.$_.'.awarded'} = $partial |
Line 1542 sub saveHandGrade {
|
Line 1563 sub saveHandGrade {
|
&Apache::lonnet::cstore(\%newrecord,$symb, |
&Apache::lonnet::cstore(\%newrecord,$symb, |
$ENV{'request.course.id'},$domain,$stuname); |
$ENV{'request.course.id'},$domain,$stuname); |
} |
} |
return ''; |
return '',$pts,$wgt; |
} |
} |
|
|
#-------------------------------------------------------------------------------------- |
#-------------------------------------------------------------------------------------- |
Line 1738 sub viewgrades {
|
Line 1759 sub viewgrades {
|
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="command" value="editgrades" />'."\n". |
'<input type="hidden" name="command" value="editgrades" />'."\n". |
'<input type="hidden" name="section" value="'.$ENV{'form.section'}.'" />'."\n". |
'<input type="hidden" name="section" value="'.$ENV{'form.section'}.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n"; |
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n"; |
|
|
$result.='<h3>Assign Common Grade To '; |
$result.='<h3>Assign Common Grade To '; |
Line 2158 to this page if the data selected is ins
|
Line 2176 to this page if the data selected is ins
|
value="$ENV{'form.upfile_associate'}" /> |
value="$ENV{'form.upfile_associate'}" /> |
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="url" value="$url" /> |
<input type="hidden" name="url" value="$url" /> |
<input type="hidden" name="saveCmd" value="$ENV{'form.saveCmd'}" /> |
<input type="hidden" name="saveState" value="$ENV{'form.saveState'}" /> |
<input type="hidden" name="saveSec" value="$ENV{'form.saveSec'}" /> |
|
<input type="hidden" name="saveSub" value="$ENV{'form.saveSub'}" /> |
|
<input type="hidden" name="saveStatus" value="$ENV{'form.saveStatus'}" /> |
|
<input type="hidden" name="probTitle" value="$ENV{'form.probTitle'}" /> |
<input type="hidden" name="probTitle" value="$ENV{'form.probTitle'}" /> |
<input type="hidden" name="command" value="csvuploadassign" /> |
<input type="hidden" name="command" value="csvuploadassign" /> |
<hr /> |
<hr /> |
Line 2355 LISTJAVASCRIPT
|
Line 2370 LISTJAVASCRIPT
|
my $result='<h3><font color="#339933"> '. |
my $result='<h3><font color="#339933"> '. |
'Manual Grading by Page or Sequence</font></h3>'; |
'Manual Grading by Page or Sequence</font></h3>'; |
|
|
$result.='<form action="/adm/grades" method="post" name="displayPage">'."<br>\n"; |
$result.='<form action="/adm/grades" method="post" name="displayPage">'."\n"; |
$result.=' <b>Problems from:</b> <select name="selectpage">'."\n"; |
$result.=' <b>Problems from:</b> <select name="selectpage">'."\n"; |
my ($titles,$symbx) = &getSymbMap($request); |
my ($titles,$symbx) = &getSymbMap($request); |
my ($curpage,$type,$mapId) = ($symb =~ /(.*?\.(page|sequence))___(\d+)___/); |
my ($curpage,$type,$mapId) = ($symb =~ /(.*?\.(page|sequence))___(\d+)___/); |
Line 2389 LISTJAVASCRIPT
|
Line 2404 LISTJAVASCRIPT
|
$result.='<input type="hidden" name="section" value="'.$getsec.'" />'."\n". |
$result.='<input type="hidden" name="section" value="'.$getsec.'" />'."\n". |
'<input type="hidden" name="command" value="displayPage" />'."\n". |
'<input type="hidden" name="command" value="displayPage" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."<br><br>\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."<br />\n"; |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n"; |
|
|
|
$result.='<br /> <input type="button" '. |
$result.=' <input type="button" '. |
'onClick="javascript:checkPickOne(this.form);"value="Submit" /><br />'."\n"; |
'onClick="javascript:checkPickOne(this.form);"value="Submit" /><br />'."\n"; |
|
|
$request->print($result); |
$request->print($result); |
Line 2433 LISTJAVASCRIPT
|
Line 2445 LISTJAVASCRIPT
|
|
|
sub getSymbMap { |
sub getSymbMap { |
my ($request) = @_; |
my ($request) = @_; |
my $navmap = Apache::lonnavmaps::navmap-> new($request, |
my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db', |
$ENV{'request.course.fn'}.'.db', |
|
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
|
|
my $res = $navmap->firstResource(); # temp resource to access constants |
my $res = $navmap->firstResource(); # temp resource to access constants |
Line 2509 sub displayPage {
|
Line 2520 sub displayPage {
|
&sub_page_js($request); |
&sub_page_js($request); |
$request->print($result); |
$request->print($result); |
|
|
my $navmap = Apache::lonnavmaps::navmap-> new($request, |
my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db', |
$ENV{'request.course.fn'}.'.db', |
|
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'}); |
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'}); |
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps |
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps |
Line 2525 sub displayPage {
|
Line 2535 sub displayPage {
|
'<input type="hidden" name="title" value="'.$ENV{'form.title'}.'" />'."\n". |
'<input type="hidden" name="title" value="'.$ENV{'form.title'}.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n"; |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n"; |
|
|
|
my $checkIcon = '<img src="'.$request->dir_config('lonIconsURL'). |
my $checkIcon = '<img src="'.$request->dir_config('lonIconsURL'). |
'/check.gif" height="16" border="0" />'; |
'/check.gif" height="16" border="0" />'; |
Line 2560 sub displayPage {
|
Line 2567 sub displayPage {
|
} else { |
} else { |
my $companswer = &Apache::loncommon::get_student_answers( |
my $companswer = &Apache::loncommon::get_student_answers( |
$symbx,$uname,$udom,$ENV{'request.course.id'}); |
$symbx,$uname,$udom,$ENV{'request.course.id'}); |
$companswer=~s|<form(.*?)>||g; |
$companswer =~ s|<form(.*?)>||g; |
$companswer=~s|</form>||g; |
$companswer =~ s|</form>||g; |
|
|
# while ($companswer =~ /(<a href\=\"javascript:newWindow.*?Script Vars<\/a>)/s) { #<a href="javascript:newWindow</a> |
# while ($companswer =~ /(<a href\=\"javascript:newWindow.*?Script Vars<\/a>)/s) { #<a href="javascript:newWindow</a> |
# $request->print('match='.$1.'<br>'); |
# $request->print('match='.$1.'<br>'); |
Line 2590 sub displayPage {
|
Line 2597 sub displayPage {
|
my @displaySub = (); |
my @displaySub = (); |
foreach my $partid (@{$parts}) { |
foreach my $partid (@{$parts}) { |
my @matchKey = grep /^resource\.$partid\..*?\.submission$/,@versionKeys; |
my @matchKey = grep /^resource\.$partid\..*?\.submission$/,@versionKeys; |
next if ($record{"$version:resource.$partid.award"} eq 'APPROX_ANS' && |
next if ($record{"$version:resource.$partid.solved"} eq ''); |
$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]}) ? |
$displaySub[0].=(exists $record{$version.':'.$matchKey[0]}) ? |
'<b>Part:</b> '.$partid.' <b>Submission:</b> ' |
'<b>Part '.$partid.' '. |
.$record{$version.':'.$matchKey[0]}.'<br />' : ''; |
($record{"$version:resource.$partid.tries"} eq '' ? 'Trial not counted' : |
|
'Trial '.$record{"$version:resource.$partid.tries"}).'</b> '. |
|
$record{$version.':'.$matchKey[0]}.'<br />' : ''; |
$displaySub[1].=(exists $record{"$version:resource.$partid.award"}) ? |
$displaySub[1].=(exists $record{"$version:resource.$partid.award"}) ? |
'<b>Part:</b> '.$partid.' '. |
'<b>Part '.$partid.'</b> '. |
$record{"$version:resource.$partid.award"}.'/'. |
$record{"$version:resource.$partid.award"}.'/'. |
$record{"$version:resource.$partid.solved"}.'<br />' : ''; |
$record{"$version:resource.$partid.solved"}.'<br />' : ''; |
$displaySub[2].=(exists $record{"$version:resource.$partid.regrader"}) ? |
$displaySub[2].=(exists $record{"$version:resource.$partid.regrader"}) ? |
Line 2667 sub updateGradeByPage {
|
Line 2677 sub updateGradeByPage {
|
|
|
$request->print($result); |
$request->print($result); |
|
|
my $navmap = Apache::lonnavmaps::navmap-> new($request, |
my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db', |
$ENV{'request.course.fn'}.'.db', |
|
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'}); |
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'}); |
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps |
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps |
Line 2770 sub updateGradeByPage {
|
Line 2779 sub updateGradeByPage {
|
# |
# |
#------ start of section for handling grading by page/sequence --------- |
#------ start of section for handling grading by page/sequence --------- |
|
|
|
sub defaultFormData { |
|
my ($symb,$url)=@_; |
|
return ' |
|
<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
|
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
|
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$ENV{'form.probTitle'}.'" />'."\n"; |
|
} |
|
|
sub getSequenceDropDown { |
sub getSequenceDropDown { |
my ($request,$symb)=@_; |
my ($request,$symb)=@_; |
my $result='<select name="selectpage">'."\n"; |
my $result='<select name="selectpage">'."\n"; |
Line 2787 sub getSequenceDropDown {
|
Line 2805 sub getSequenceDropDown {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub scantron_uploads { |
|
if (!-e $Apache::lonnet::perlvar{'lonScansDir'}) { return ''}; |
|
my $result= '<select name="scantron_selectfile">'; |
|
opendir(DIR,$Apache::lonnet::perlvar{'lonScansDir'}); |
|
my @files=sort(readdir(DIR)); |
|
foreach my $filename (@files) { |
|
if ($filename eq '.' or $filename eq '..') { next; } |
|
$result.="<option>$filename</option>\n"; |
|
} |
|
closedir(DIR); |
|
$result.="</select>"; |
|
return $result; |
|
} |
|
|
sub scantron_selectphase { |
sub scantron_selectphase { |
my ($r) = @_; |
my ($r) = @_; |
my ($symb,$url)=&get_symb_and_url($r); |
my ($symb,$url)=&get_symb_and_url($r); |
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $sequence_selector=&getSequenceDropDown($r,$symb); |
my $sequence_selector=&getSequenceDropDown($r,$symb); |
|
my $default_form_data=&defaultFormData($symb,$url); |
|
my $grading_menu_button=&show_grading_menu_form($symb,$url); |
|
my $file_selector=&scantron_uploads(); |
my $result; |
my $result; |
$result.= <<SCANTRONFORM; |
$result.= <<SCANTRONFORM; |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantronupload"> |
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantronupload"> |
<input type="hidden" name="symb" value="$symb" /> |
|
<input type="hidden" name="url" value="$url" /> |
|
<input type="hidden" name="command" value="scantron_configphase" /> |
<input type="hidden" name="command" value="scantron_configphase" /> |
|
$default_form_data |
<table width="100%" border="0"> |
<table width="100%" border="0"> |
<tr> |
<tr> |
<td bgcolor="#777777"> |
<td bgcolor="#777777"> |
Line 2814 sub scantron_selectphase {
|
Line 2848 sub scantron_selectphase {
|
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> |
<!-- FIXME I need to present a list of files from a specfic directory that has been configured, or any existing delay queues --> |
Filename of scoring office file: $file_selector |
Filename of scoring office file: |
|
<select name="selectfile"> |
|
<option value="filname1">filename1</option> |
|
<option value="filname2">filename2</option> |
|
</select> |
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 2828 sub scantron_selectphase {
|
Line 2857 sub scantron_selectphase {
|
</table> |
</table> |
<input type="submit" value="Submit" /> |
<input type="submit" value="Submit" /> |
</form> |
</form> |
|
$grading_menu_button |
SCANTRONFORM |
SCANTRONFORM |
|
|
return $result; |
return $result; |
Line 2835 SCANTRONFORM
|
Line 2865 SCANTRONFORM
|
|
|
sub scantron_configphase { |
sub scantron_configphase { |
my ($r) = @_; |
my ($r) = @_; |
my $sequence=$ENV{'form.selectpage'}; |
my (undef,undef,$sequence)=split(/___/,$ENV{'form.selectpage'}); |
my $result; |
my $result; |
$result.="got page $sequence"; |
my ($symb,$url)=&get_symb_and_url($r); |
$Apache::lonxml::debug=1; |
if (!$symb) {return '';} |
&Apache::lonhomework::showhash(%ENV); |
my $default_form_data=&defaultFormData($symb,$url); |
$Apache::lonxml::debug=0; |
my $grading_menu_button=&show_grading_menu_form($symb,$url); |
|
my $file_selector; |
|
$result.= <<SCANTRONFORM; |
|
<form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantronupload"> |
|
<input type="hidden" name="command" value="scantron_configphase" /> |
|
$default_form_data |
|
<table width="100%" border="0"> |
|
<tr> |
|
<td bgcolor="#777777"> |
|
<table width="100%" border="0"> |
|
<tr bgcolor="#e6ffff"> |
|
<td> |
|
<b>Select a format for the data file.</b> |
|
</td> |
|
</tr> |
|
<tr bgcolor="#ffffe6"> |
|
<td> |
|
Format of data file: |
|
</td> |
|
</tr> |
|
<tr bgcolor="#ffffe6"> |
|
<td> |
|
Filename of scoring office file: $file_selector |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
<input type="submit" value="Submit" /> |
|
</form> |
|
$grading_menu_button |
|
SCANTRONFORM |
#FIXME Needs to present some lines from the file and allow the instructor to specify which columns represent what data, possibly have some nice defaults setup, probably should do a pass through all problems for a student to get an idea of how many questions there are, and homw many lines we'll have, |
#FIXME Needs to present some lines from the file and allow the instructor to specify which columns represent what data, possibly have some nice defaults setup, probably should do a pass through all problems for a student to get an idea of how many questions there are, and homw many lines we'll have, |
return $result; |
return $result; |
} |
} |
Line 2878 sub show_grading_menu_form {
|
Line 2940 sub show_grading_menu_form {
|
my $result.='<form action="/adm/grades" method="post">'."\n". |
my $result.='<form action="/adm/grades" method="post">'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="'.$ENV{'form.saveCmd'}.'" />'."\n". |
'<input type="hidden" name="saveState" value="'.$ENV{'form.saveState'}.'" />'."\n". |
'<input type="hidden" name="saveSec" value="'.$ENV{'form.saveSec'}.'" />'."\n". |
|
'<input type="hidden" name="saveSub" value="'.$ENV{'form.saveSub'}.'" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="'.$ENV{'form.saveStatus'}.'" />'."\n". |
|
'<input type="hidden" name="command" value="gradingmenu" />'."\n". |
'<input type="hidden" name="command" value="gradingmenu" />'."\n". |
'<input type="submit" name="submit" value="Grading Menu" />'."\n". |
'<input type="submit" name="submit" value="Grading Menu" />'."\n". |
'</form>'."\n"; |
'</form>'."\n"; |
return $result; |
return $result; |
} |
} |
|
|
|
# -- Retrieve choices for grading form |
|
sub savedState { |
|
my %savedState = (); |
|
if ($ENV{'form.saveState'}) { |
|
foreach (split(/:/,$ENV{'form.saveState'})) { |
|
my ($key,$value) = split(/=/,$_,2); |
|
$savedState{$key} = $value; |
|
} |
|
} |
|
return \%savedState; |
|
} |
|
|
#--- Displays the main menu page ------- |
#--- Displays the main menu page ------- |
sub gradingmenu { |
sub gradingmenu { |
Line 2895 sub gradingmenu {
|
Line 2965 sub gradingmenu {
|
my ($symb,$url)=&get_symb_and_url($request); |
my ($symb,$url)=&get_symb_and_url($request); |
if (!$symb) {return '';} |
if (!$symb) {return '';} |
my $probTitle = &Apache::lonnet::gettitle($symb); |
my $probTitle = &Apache::lonnet::gettitle($symb); |
my $saveCmd = ($ENV{'form.saveCmd'} eq '' ? 'pickStudentPage' : $ENV{'form.saveCmd'}); |
|
my $saveSec = ($ENV{'form.saveSec'} eq '' ? 'all' : $ENV{'form.saveSec'}); |
|
my $saveSub = ($ENV{'form.saveSub'} eq '' ? 'yes' : $ENV{'form.saveSub'}); |
|
my $saveStatus = ($ENV{'form.saveStatus'} eq '' ? 'Active' : $ENV{'form.saveStatus'}); |
|
|
|
$request->print(<<GRADINGMENUJS); |
$request->print(<<GRADINGMENUJS); |
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
function checkChoice(formname) { |
function checkChoice(formname) { |
var cmd = formname.command; |
var cmd = formname.command; |
formname.saveCmd.value = radioSelection(cmd); |
formname.saveState.value = "saveCmd="+radioSelection(cmd)+":saveSec="+pullDownSelection(formname.section)+ |
formname.saveSec.value = pullDownSelection(formname.section); |
":saveSub="+radioSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.status); |
formname.saveSub.value = radioSelection(formname.submitonly); |
|
formname.saveStatus.value = pullDownSelection(formname.status); |
|
if (cmd[0].checked || cmd[1].checked || cmd[2].checked || cmd[4].checked) formname.submit(); |
if (cmd[0].checked || cmd[1].checked || cmd[2].checked || cmd[4].checked) formname.submit(); |
|
|
if (cmd[3].checked) browseAndUpload(); |
if (cmd[3].checked) browseAndUpload(); |
Line 2974 sub gradingmenu {
|
Line 3038 sub gradingmenu {
|
lDoc.write(" alert(\\"Please use the browse button to select a file from your local directory.\\");"); |
lDoc.write(" alert(\\"Please use the browse button to select a file from your local directory.\\");"); |
lDoc.write(" return false;"); |
lDoc.write(" return false;"); |
lDoc.write(" }"); |
lDoc.write(" }"); |
|
lDoc.write(" var openformname = opener.document.gradingMenu;"); |
|
lDoc.write(" formname.saveState.value = \\"saveCmd=\\"+opener.radioSelection(openformname.command)+\\":saveSec=\\"+opener.pullDownSelection(openformname.section)+\\":saveSub=\\"+opener.radioSelection(openformname.submitonly)+\\":saveStatus=\\"+opener.pullDownSelection(openformname.status);"); |
lDoc.write(" document.gradesupload.submit();"); |
lDoc.write(" document.gradesupload.submit();"); |
|
lDoc.write(" if (navigator.appName !=\\"Netscape\\") {self.close()};"); |
lDoc.write(" setTimeout('self.close()',750)"); |
lDoc.write(" setTimeout('self.close()',750)"); |
lDoc.write("}"); |
lDoc.write("}"); |
|
|
Line 2986 sub gradingmenu {
|
Line 3053 sub gradingmenu {
|
lDoc.write("<input type=\\"hidden\\" name=\\"symb\\" value=\\"$symb\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"symb\\" value=\\"$symb\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"url\\" value=\\"$url\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"url\\" value=\\"$url\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"probTitle\\" value=\\"$probTitle\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"probTitle\\" value=\\"$probTitle\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"saveCmd\\" value=\\"csvupload\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"saveState\\" value=\\"\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"saveSec\\" value=\\"$saveSec\\">"); |
|
lDoc.write("<input type=\\"hidden\\" name=\\"saveSub\\" value=\\"$saveSub\\">"); |
|
lDoc.write("<input type=\\"hidden\\" name=\\"saveStatus\\" value=\\"$saveStatus\\">"); |
|
lDoc.write("<input type=\\"hidden\\" name=\\"command\\" value=\\"csvuploadmap\\">"); |
lDoc.write("<input type=\\"hidden\\" name=\\"command\\" value=\\"csvuploadmap\\">"); |
|
|
lDoc.write("<font color=\\"green\\" size=+1><b>Specify a file containing the class scores for problem - $probTitle</b></font><br><br>"); |
lDoc.write("<font color=\\"green\\" size=+1> <b>Specify a file containing the class scores for problem - $probTitle</b></font><br><br>"); |
|
|
lDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">"); |
lDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">"); |
lDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">"); |
lDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">"); |
Line 3030 GRADINGMENUJS
|
Line 3094 GRADINGMENUJS
|
$result.='</table>'."\n"; |
$result.='</table>'."\n"; |
|
|
my (undef,$sections) = &getclasslist('all','0'); |
my (undef,$sections) = &getclasslist('all','0'); |
|
my $savedState = &savedState(); |
|
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'pickStudentPage' : $$savedState{'saveCmd'}); |
|
my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'}); |
|
my $saveSub = ($$savedState{'saveSub'} eq '' ? 'yes' : $$savedState{'saveSub'}); |
|
my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'}); |
|
|
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
Line 3037 GRADINGMENUJS
|
Line 3106 GRADINGMENUJS
|
'<input type="hidden" name="response" value="'.$resptype.'" />'."\n". |
'<input type="hidden" name="response" value="'.$resptype.'" />'."\n". |
'<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
'<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="probTitle" value="'.$probTitle.'" />'."\n". |
'<input type="hidden" name="saveCmd" value="" />'."\n". |
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="saveSec" value="" />'."\n". |
|
'<input type="hidden" name="saveSub" value="" />'."\n". |
|
'<input type="hidden" name="saveStatus" value="" />'."\n". |
|
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
$result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n". |
$result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n". |
Line 3075 GRADINGMENUJS
|
Line 3141 GRADINGMENUJS
|
'Upload scores from file</td></tr>'."\n"; |
'Upload scores from file</td></tr>'."\n"; |
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
'<input type="radio" name="command" value="scantron_selectphase" /> '. |
'<input type="radio" name="command" value="scantron_selectphase" '. |
|
($saveCmd eq 'scantron_selectphase' ? 'checked="on"' : '').' /> '. |
'Grade scantron forms</td></tr>'."\n"; |
'Grade scantron forms</td></tr>'."\n"; |
|
|
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)) { |
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)) { |