version 1.61, 2002/11/27 15:54:24
|
version 1.69, 2003/02/27 22:39:11
|
Line 31
|
Line 31
|
# 8/20 Gerd Kortemeyer |
# 8/20 Gerd Kortemeyer |
# Year 2002 |
# Year 2002 |
# June-August H.K. Ng |
# June-August H.K. Ng |
|
# Year 2003 |
|
# February H.K. Ng |
# |
# |
|
|
package Apache::grades; |
package Apache::grades; |
Line 39 use Apache::style;
|
Line 41 use Apache::style;
|
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
|
use Apache::lonnavmaps; |
use Apache::lonhomework; |
use Apache::lonhomework; |
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonmsg qw(:user_normal_msg); |
use Apache::lonmsg qw(:user_normal_msg); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
|
|
# ----- These first few routines are general use routines.----- |
# ----- These first few routines are general use routines.---- |
# |
# |
# --- Retrieve the parts that matches stores_\d+ from the metadata file.--- |
# --- Retrieve the parts that matches stores_\d+ from the metadata file.--- |
sub getpartlist { |
sub getpartlist { |
Line 269 sub verifyreceipt {
|
Line 272 sub verifyreceipt {
|
return $string.&show_grading_menu_form($symb,$url); |
return $string.&show_grading_menu_form($symb,$url); |
} |
} |
|
|
|
# |
|
# Pick student and page/sequence for manual grading |
|
|
|
|
#--- This is called by a number of programs. |
#--- This is called by a number of programs. |
#--- Called from the Grading Menu - View/Grade an individual student |
#--- Called from the Grading Menu - View/Grade an individual student |
#--- Also called directly when one clicks on the subm button |
#--- Also called directly when one clicks on the subm button |
Line 293 sub listStudents {
|
Line 300 sub listStudents {
|
} |
} |
$result.='</table>'; |
$result.='</table>'; |
|
|
my $viewgrade; |
my $viewgrade = $ENV{'form.handgrade'} eq 'yes' ? 'View/Grade' : 'View'; |
if ($ENV{'form.handgrade'} eq 'yes') { |
|
$viewgrade = 'View/Grade'; |
|
} else { |
|
$viewgrade = 'View'; |
|
} |
|
|
|
$result='<h3><font color="#339933"> '. |
$result='<h3><font color="#339933"> '. |
$viewgrade. |
$viewgrade. |
Line 672 sub sub_page_js {
|
Line 674 sub sub_page_js {
|
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<td>Subject</td>"); |
pWin.document.write("<td>Subject</td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"subchk\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"subchk\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+" \\"size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+"\\"size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
} |
} |
|
|
function displaySavedMsg(ctr,msg,shwsel) { |
function displaySavedMsg(ctr,msg,shwsel) { |
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<td align=\\"center\\">"+ctr+"</td>"); |
pWin.document.write("<td align=\\"center\\">"+ctr+"</td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"msgn"+ctr+"\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"msgn"+ctr+"\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td><input name=\\"msg"+ctr+"\\" type=\\"text\\" value=\\""+msg+" \\" size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
pWin.document.write("<td><input name=\\"msg"+ctr+"\\" type=\\"text\\" value=\\""+msg+"\\" size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
} |
} |
|
|
function newMsg(newmsg,shwsel) { |
function newMsg(newmsg,shwsel) { |
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">"); |
pWin.document.write("<td align=\\"center\\">New</td>"); |
pWin.document.write("<td align=\\"center\\">New</td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"newmsgchk\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td align=\\"center\\"><input name=\\"newmsgchk\\" type=\\"checkbox\\"" +shwsel+"></td>"); |
pWin.document.write("<td><input name=\\"newmsg\\" type=\\"text\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" value=\\""+newmsg+" \\" size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
pWin.document.write("<td><input name=\\"newmsg\\" type=\\"text\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" value=\\""+newmsg+"\\" size=\\"60\\" maxlength=\\"80\\"></td></tr>"); |
} |
} |
|
|
function msgTail() { |
function msgTail() { |
Line 846 sub submission {
|
Line 848 sub submission {
|
|
|
# option to display problem, only once else it cause problems |
# option to display problem, only once else it cause problems |
# with the form later since the problem has a form. |
# with the form later since the problem has a form. |
if ($ENV{'form.vProb'} eq 'yes') { |
if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) { |
&show_problem($request,$symb,$uname,$udom,0); |
&show_problem($request,$symb,$uname,$udom,0); |
} |
} |
|
|
Line 1021 KEYWORDS
|
Line 1023 KEYWORDS
|
my ($ressub,$subval) = split(/:/,$_,2); |
my ($ressub,$subval) = split(/:/,$_,2); |
$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> <b>Answer: </b>'. |
' )</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>Answer: </b>'. |
&keywords_highlight($subval).'</td></tr>'."\n" |
&keywords_highlight($subval).'</td></tr>'."\n" |
if ($ENV{'form.lastSub'} eq 'lastonly' || |
if ($ENV{'form.lastSub'} eq 'lastonly' || |
($ENV{'form.lastSub'} eq 'hdgrade' && |
($ENV{'form.lastSub'} eq 'hdgrade' && |
Line 1226 sub processHandGrade {
|
Line 1233 sub processHandGrade {
|
|
|
my $includemsg = $ENV{'form.includemsg'.$ctr}; |
my $includemsg = $ENV{'form.includemsg'.$ctr}; |
my ($subject,$message,$msgstatus) = ('','',''); |
my ($subject,$message,$msgstatus) = ('','',''); |
if ($includemsg =~ /savemsg|new$ctr/) { |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
$subject = $ENV{'form.msgsub'} if ($includemsg =~ /^msgsub/); |
$subject = $ENV{'form.msgsub'} if ($includemsg =~ /^msgsub/); |
my (@msgnum) = split(/,/,$includemsg); |
my (@msgnum) = split(/,/,$includemsg); |
foreach (@msgnum) { |
foreach (@msgnum) { |
Line 1725 sub viewstudentgrade {
|
Line 1732 sub viewstudentgrade {
|
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom. |
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom. |
'\')"; TARGET=_self>'.$fullname.'</a>'. |
'\')"; TARGET=_self>'.$fullname.'</a>'. |
'</td><td>'.$uname.'</td><td align="middle">'.$udom.'</td>'."\n"; |
'</td><td>'.$uname.'</td><td align="middle">'.$udom.'</td>'."\n"; |
foreach my $part (@$parts) { |
foreach my $apart (@$parts) { |
my ($part,$type) = &split_part_type($part); |
my ($part,$type) = &split_part_type($apart); |
my $score=$record{"resource.$part.$type"}; |
my $score=$record{"resource.$part.$type"}; |
if ($type eq 'awarded') { |
if ($type eq 'awarded') { |
my $pts = $score eq '' ? '' : $score*$$weight{$part}; |
my $pts = $score eq '' ? '' : $score*$$weight{$part}; |
Line 2193 sub gradingmenu {
|
Line 2200 sub gradingmenu {
|
$result.=&view_edit_entire_class_form($symb,$url).'<br />'; |
$result.=&view_edit_entire_class_form($symb,$url).'<br />'; |
$result.=&upcsvScores_form($symb,$url).'<br />'; |
$result.=&upcsvScores_form($symb,$url).'<br />'; |
$result.=&viewGradeaStu_form($symb,$url,$resptype,$hdgrade).'<br />'; |
$result.=&viewGradeaStu_form($symb,$url,$resptype,$hdgrade).'<br />'; |
|
$result.=&gradeByPage_form($symb,$url,$resptype,$hdgrade).'<br />'; |
$result.=&verifyReceipt_form($symb,$url) |
$result.=&verifyReceipt_form($symb,$url) |
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)); |
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)); |
|
|
Line 2264 sub viewGradeaStu_form {
|
Line 2272 sub viewGradeaStu_form {
|
my $result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n"; |
my $result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n"; |
$result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n"; |
$result.=' <b>'; |
$result.=' <b>'; |
if ($handgrade eq 'yes') { |
$result.=($handgrade eq 'yes' ? 'View/Grade' : 'View').' an Individual Student\'s Submission</b></td></tr>'."\n"; |
$result.="View/Grade "; |
|
} else { |
|
$result.="View "; |
|
} |
|
$result.='an Individual Student\'s Submission</b></td></tr>'."\n"; |
|
$result.='<tr bgcolor=#ffffe6><td>'."\n"; |
$result.='<tr bgcolor=#ffffe6><td>'."\n"; |
$result.='<form action="/adm/grades" method="post">'."\n". |
$result.='<form action="/adm/grades" method="post">'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
Line 2305 sub viewGradeaStu_form {
|
Line 2308 sub viewGradeaStu_form {
|
return $result; |
return $result; |
} |
} |
|
|
|
#--- Handgrading problems by page/sequence for each student --- |
|
sub gradeByPage_form { |
|
my ($symb,$url,$response,$handgrade) = @_; |
|
my ($classlist,$sections) = &getclasslist('all','0'); |
|
my $result.='<table width=100% border=0><tr><td bgcolor=#777777>'."\n"; |
|
$result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n"; |
|
$result.=' <b>'; |
|
$result.='Handgrade an Individual Student\'s by Page/Sequence</b></td></tr>'."\n"; |
|
$result.='<tr bgcolor=#ffffe6><td>'."\n"; |
|
$result.='<form action="/adm/grades" method="post">'."\n". |
|
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n". |
|
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
|
'<input type="hidden" name="response" value="'.$response.'" />'."\n". |
|
'<input type="hidden" name="handgrade" value="'.$handgrade.'" />'."\n". |
|
'<input type="hidden" name="showgrading" value="yes" />'."\n". |
|
'<input type="hidden" name="command" value="pickStudentPage" />'."\n"; |
|
|
|
$result.=' <b>Select section:</b> <select name="section">'."\n"; |
|
if (ref($sections)) { |
|
foreach (sort (@$sections)) {$result.='<option>'.$_.'</option>'."\n";} |
|
} |
|
$result.= '<option selected="on">all</select>'."\n"; |
|
|
|
$result.='<br /> <input type="button" onClick="submit();" value="'; |
|
$result.='View/Grade'.'" />'."\n".'</form>'."\n"; |
|
$result.='</td></tr></table>'."\n"; |
|
$result.='</td></tr></table>'."\n"; |
|
return $result; |
|
} |
|
|
|
|
|
sub pickStudentPage { |
|
my ($request) = shift; |
|
|
|
$request->print(<<LISTJAVASCRIPT); |
|
<script type="text/javascript" language="javascript"> |
|
|
|
function checkPickOne(formname) { |
|
var user = radioSelection(formname.pickOne); |
|
if (user == null) { |
|
alert("Please select the student you wish to grade."); |
|
return; |
|
} |
|
formname.submit(); |
|
} |
|
|
|
function radioSelection(radioButton) { |
|
var selection=null; |
|
for (var i=0; i<radioButton.length; i++) { |
|
if (radioButton[i].checked) { |
|
selection=radioButton[i].value; |
|
return selection; |
|
} |
|
} |
|
return selection; |
|
} |
|
</script> |
|
LISTJAVASCRIPT |
|
|
|
my ($symb,$url) = &get_symb_and_url(); |
|
my $cdom = $ENV{"course.$ENV{'request.course.id'}.domain"}; |
|
my $cnum = $ENV{"course.$ENV{'request.course.id'}.num"}; |
|
my $getsec = $ENV{'form.section'} eq '' ? 'all' : $ENV{'form.section'}; |
|
|
|
my $result='<h3><font color="#339933"> '. |
|
'Manual Grading by Page or Sequence</font></h3>'; |
|
|
|
my ($pagepath,$pagename,$type,$mapId) = ($symb =~ /(.*\/)(.*?\.(page|sequence))___(\d+)___/); |
|
my $curtitle = &Apache::lonnet::metadata($pagepath.$pagename,'title'); |
|
|
|
$result.='<form action="/adm/grades" method="post" name="displayPage">'."<br>\n"; |
|
$result.=' <b>Problems from:</b> <select name="page">'."\n"; |
|
my ($titles,$symbx) = &getSymbMap(); |
|
# shift @$titles; # skip the top level sequence |
|
foreach (@$titles) { |
|
my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/); |
|
my $check_select = ($showtitle eq $curtitle ? 'selected="on"' : ''); |
|
$result.='<option value="'.$_.'" '.$check_select.'>'.$showtitle.'</option>'."\n"; |
|
} |
|
$result.= '</select>'."<br>\n"; |
|
|
|
# $result.=' <b>View Problems: </b><input type="radio" name="vProb" value="no" checked /> no '."\n". |
|
# '<input type="radio" name="vProb" value="yes" /> yes '."<br>\n"; |
|
# $result.=' <b>Submission Details: </b>'. |
|
# '<input type="radio" name="lastSub" value="last" checked /> last sub only'."\n". |
|
# '<input type="radio" name="lastSub" value="all" /> all details'."\n"; |
|
$result.='<input type="hidden" name="section" value="'.$getsec.'" />'."\n". |
|
'<input type="hidden" name="command" value="displayPage" />'."\n". |
|
'<input type="hidden" name="url" value="'.$url.'" />'."\n". |
|
'<input type="hidden" name="symb" value="'.$symb.'" />'."<br><br>\n"; |
|
$request->print($result); |
|
|
|
my $studentTable.=' <b>Select a Student you wish to grade</b><br>'. |
|
'<table border="0"><tr><td bgcolor="#777777">'. |
|
'<table border="0"><tr bgcolor="#e6ffff">'. |
|
'<td><b> Fullname <font color="#999999">(username)</font></b></td>'. |
|
'<td><b> Fullname <font color="#999999">(username)</font></b></td>'. |
|
'<td><b> Fullname <font color="#999999">(username)</font></b></td>'. |
|
'<td><b> Fullname <font color="#999999">(username)</font></b></td></tr>'; |
|
|
|
my (undef,undef,$fullname) = &getclasslist($getsec,'0'); |
|
my $ptr = 1; |
|
foreach my $student (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) { |
|
my ($uname,$udom) = split(/:/,$student); |
|
$studentTable.=($ptr%4 == 1 ? '<tr bgcolor="#ffffe6"><td>' : '</td><td>'); |
|
$studentTable.='<input type="radio" name="pickOne" value="'.$student.'" /> '.$$fullname{$student}. |
|
'<font color="#999999"> ('.$uname.($udom eq $cdom ? '':':'.$udom).')</font>'."\n"; |
|
$studentTable.=($ptr%4 == 0 ? '</td></tr>' : ''); |
|
$ptr++; |
|
} |
|
$studentTable.='</td><td> </td><td> </td><td> ' if ($ptr%4 == 2); |
|
$studentTable.='</td><td> </td><td> ' if ($ptr%4 == 3); |
|
$studentTable.='</td><td> ' if ($ptr%4 == 0); |
|
$studentTable.='</td></tr></table></td></tr></table>'."\n"; |
|
$studentTable.='<br /> <input type="button" onClick="javascript:checkPickOne(this.form);" value="Submit" /></form>'."\n"; |
|
|
|
$studentTable.=&show_grading_menu_form($symb,$url); |
|
$request->print($studentTable); |
|
|
|
return ''; |
|
} |
|
|
|
sub getSymbMap { |
|
my $navmap = Apache::lonnavmaps::navmap-> new( |
|
$ENV{'request.course.fn'}.'.db', |
|
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
|
|
|
my $res = $navmap->firstResource(); # temp resource to access constants |
|
$navmap->init(); |
|
|
|
# End navmap using boilerplate |
|
|
|
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
|
my $depth = 1; |
|
$iterator->next(); # ignore first BEGIN_MAP |
|
my $curRes = $iterator->next(); |
|
|
|
my %symbx = (); |
|
my @titles = (); |
|
my $minder=0; |
|
while ($depth > 0) { |
|
if ($curRes == $iterator->BEGIN_MAP()) {$depth++;} |
|
if ($curRes == $iterator->END_MAP()) { $depth--; } |
|
|
|
if (ref($curRes) && $curRes->is_map()) { |
|
my $title = $curRes->compTitle(); |
|
push @titles,$minder.'.'.$title; # minder, just in case two titles are identical |
|
$symbx{$minder.'.'.$title} = $curRes->symb(); |
|
$minder++; |
|
} |
|
$curRes = $iterator->next(); |
|
} |
|
|
|
$navmap->untieHashes(); |
|
return \@titles,\%symbx; |
|
} |
|
|
|
sub displayPage { |
|
my ($request) = shift; |
|
|
|
my $cdom = $ENV{"course.$ENV{'request.course.id'}.domain"}; |
|
my $cnum = $ENV{"course.$ENV{'request.course.id'}.num"}; |
|
my $getsec = $ENV{'form.section'} eq '' ? 'all' : $ENV{'form.section'}; |
|
my $pageTitle = $ENV{'form.page'}; |
|
my (undef,undef,$fullname) = &getclasslist($getsec,'0'); |
|
my ($uname,$udom) = split(/:/,$ENV{'form.pickOne'}); |
|
my ($idx,$showtitle) = ($pageTitle =~ /(\d+)\.(.*)/); |
|
|
|
my $result='<h3><font color="#339933"> '.$showtitle.'</font></h3>'; |
|
$result.='<h3> Student: '.$$fullname{$ENV{'form.pickOne'}}. |
|
'<font color="#999999"> ('.$uname.($udom eq $cdom ? '':':'.$udom).')</font></h3>'."\n"; |
|
|
|
my ($pg_titles,$pg_symbx) = &getSymbMap(); |
|
|
|
my $navmap = Apache::lonnavmaps::navmap-> new( |
|
$ENV{'request.course.fn'}.'.db', |
|
$ENV{'request.course.fn'}.'_parms.db',1, 1); |
|
|
|
my ($mapUrl, $id, $resUrl) = split(/___/, $$pg_symbx{$ENV{'form.page'}}); |
|
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps |
|
|
|
my $iterator = $navmap->getIterator($map->map_start(), |
|
$map->map_finish()); |
|
|
|
my $depth = 1; |
|
$iterator->next(); # skip the first BEGIN_MAP |
|
my $curRes = $iterator->next(); # for "current resource" |
|
my %symbx = (); |
|
my @titles = (); |
|
my %parts = (); |
|
my $ctr=0; |
|
my $minder=0; |
|
while ($depth > 0 && $ctr < 100) { # ctr, just in case it never gets out of loop |
|
if($curRes == $iterator->BEGIN_MAP) { $depth++; } |
|
if($curRes == $iterator->END_MAP) { $depth++; } |
|
|
|
if (ref($curRes) && $curRes->is_problem() && !$curRes->randomout) { |
|
my $parts = $curRes->parts(); |
|
my $title = $curRes->compTitle(); |
|
push @titles,$minder.'.'.$title; # minder, just in case two titles are identical |
|
if (scalar(@{$parts}) > 1) { shift @{$parts}; } |
|
for my $part (@$parts) { |
|
$result.='title='.$title.'part='.$part.':<br>'; |
|
} |
|
$parts{$minder.'.'.$title} = join '::',@$parts; |
|
|
|
$symbx{$minder.'.'.$title} = $curRes->symb(); |
|
$minder++; |
|
|
|
} |
|
$curRes = $iterator->next(); |
|
$ctr++; |
|
} |
|
|
|
$navmap->init(); |
|
$request->print($result); |
|
|
|
my $studentTable.= |
|
'<table border="0"><tr><td bgcolor="#777777">'. |
|
'<table border="0"><tr bgcolor="#e6ffff">'. |
|
'<td><b> No </b></td>'. |
|
'<td><b> Title</b></td>'. |
|
'<td><b> Answer</b></td>'. |
|
'<td><b> Grade</b></td></tr>'; |
|
my $question=1; |
|
foreach (@titles) { |
|
my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/); |
|
$studentTable.='<tr bgcolor="#ffffe6"><td align="center" valign="top" >'.$question.'</td>'; |
|
$studentTable.='<td valign="top"> '.$showtitle.' </td>'; |
|
$studentTable.='<td> '. |
|
&Apache::loncommon::get_student_answers($symbx{$_},$uname,$udom,$ENV{'request.course.id'}).'</td>'; |
|
|
|
my (undef,undef,$requesturl)=split(/___/,$symbx{$_}); |
|
$requesturl=&Apache::lonnet::clutter($requesturl); |
|
my $subresult=&Apache::lonnet::ssi($requesturl, |
|
('grade_target' => 'analyze'), |
|
('grade_domain' => $udom), |
|
('grade_user' => $uname), |
|
('grade_symb' => $symbx{$_}), |
|
('grade_courseid' => $ENV{'request.course.id'})); |
|
(undef,$subresult)=split(/_HASH_REF__/,$subresult,2); |
|
my %analyze=&Apache::lonnet::str2hash($subresult); |
|
|
|
$studentTable.='<td> '; |
|
while (my($key,$value) = each (%analyze)){ |
|
$studentTable.='key='.$key.'->value='.$value.'<br>'; |
|
} |
|
$studentTable.='</td></tr>'; |
|
$question++; |
|
|
|
} |
|
|
|
$studentTable.='</table></td></tr></table>'; |
|
# $result.='<form action="/adm/grades" method="post" name="displayPage">'."<br>\n"; |
|
# $result.='</form>'."\n"; |
|
|
|
$request->print($studentTable); |
|
|
|
|
|
return ''; |
|
} |
|
|
#--- Form to input a receipt number --- |
#--- Form to input a receipt number --- |
sub verifyReceipt_form { |
sub verifyReceipt_form { |
my ($symb,$url) = @_; |
my ($symb,$url) = @_; |
Line 2392 sub handler {
|
Line 2657 sub handler {
|
} else { |
} else { |
$Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'}); |
$Apache::grades::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'}); |
if ($command eq 'submission') { |
if ($command eq 'submission') { |
&listStudents($request) if ($ENV{'form.student'} eq ''); |
($ENV{'form.student'} eq '' ? &listStudents($request) : &submission($request,0,0)); |
&submission($request,0,0) if ($ENV{'form.student'} ne ''); |
# if ($command eq 'submission') { |
|
# &listStudents($request) if ($ENV{'form.student'} eq ''); |
|
# &submission($request,0,0) if ($ENV{'form.student'} ne ''); |
|
} elsif ($command eq 'pickStudentPage') { |
|
&pickStudentPage($request); |
|
} elsif ($command eq 'displayPage') { |
|
&displayPage($request); |
} elsif ($command eq 'processGroup') { |
} elsif ($command eq 'processGroup') { |
&processGroup($request); |
&processGroup($request); |
} elsif ($command eq 'gradingmenu') { |
} elsif ($command eq 'gradingmenu') { |