version 1.163, 2003/11/25 21:54:58
|
version 1.167, 2003/12/05 14:59:51
|
Line 48 use Apache::lonhomework;
|
Line 48 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); |
use String::Similarity; |
use Apache::lonlocal; |
|
#use String::Similarity; |
|
|
my %oldessays=(); |
my %oldessays=(); |
my %perm=(); |
my %perm=(); |
Line 168 sub showResourceInfo {
|
Line 169 sub showResourceInfo {
|
my $col=3; |
my $col=3; |
if ($checkboxes) { $col=4; } |
if ($checkboxes) { $col=4; } |
my $result ='<table border="0">'. |
my $result ='<table border="0">'. |
'<tr><td colspan="'.$col.'"><font size="+1"><b>Current Resource: </b>'. |
'<tr><td colspan="'.$col.'"><font size="+1"><b>'.&mt('Current Resource').': </b>'. |
$probTitle.'</font></td></tr>'."\n"; |
$probTitle.'</font></td></tr>'."\n"; |
my ($partlist,$handgrade,$responseType) = &response_type($url); |
my ($partlist,$handgrade,$responseType) = &response_type($url); |
my %resptype = (); |
my %resptype = (); |
Line 290 sub cleanRecord {
|
Line 291 sub cleanRecord {
|
$ENV{'form.kwstyle'} = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : ''; |
$ENV{'form.kwstyle'} = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : ''; |
$ENV{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob. |
$ENV{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob. |
} |
} |
return '<br /><br /><blockquote><pre>'.&keywords_highlight($answer).'</pre></blockquote>'; |
$answer =~ s-\n-<br />-g; |
|
return '<br /><br /><blockquote><tt>'.&keywords_highlight($answer).'</tt></blockquote>'; |
} |
} |
return $answer; |
return $answer; |
} |
} |
Line 678 LISTJAVASCRIPT
|
Line 680 LISTJAVASCRIPT
|
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
(%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
(%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
my $submitted = 0; |
my $submitted = 0; |
my $graded = 1; |
my $graded = 0; |
foreach (keys(%status)) { |
foreach (keys(%status)) { |
$submitted = 1 if ($status{$_} ne 'nothing'); |
$submitted = 1 if ($status{$_} ne 'nothing'); |
$graded = 0 if ($status{$_} =~ /^correct/); |
$graded = 1 if ($status{$_} !~ /^correct/); |
|
|
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; |
Line 1375 sub submission {
|
Line 1378 sub submission {
|
return; |
return; |
} |
} |
|
|
$ENV{'form.lastSub'} = ($ENV{'form.lastSub'} eq '' ? 'datesub' : $ENV{'form.lastSub'}); |
if (!$ENV{'form.lastSub'}) { $ENV{'form.lastSub'} = 'datesub'; } |
|
if (!$ENV{'form.vProb'}) { $ENV{'form.vProb'} = 'yes'; } |
|
if (!$ENV{'form.vAns'}) { $ENV{'form.vAns'} = 'yes'; } |
my $last = ($ENV{'form.lastSub'} eq 'last' ? 'last' : ''); |
my $last = ($ENV{'form.lastSub'} eq 'last' ? 'last' : ''); |
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 2243 sub viewgrades {
|
Line 2248 sub viewgrades {
|
&viewgrades_js($request); |
&viewgrades_js($request); |
|
|
my ($symb,$url) = ($ENV{'form.symb'},$ENV{'form.url'}); |
my ($symb,$url) = ($ENV{'form.symb'},$ENV{'form.url'}); |
my $result='<h3><font color="#339933">Manual Grading</font></h3>'; |
my $result='<h3><font color="#339933">'.&mt('Manual Grading').'</font></h3>'; |
|
|
$result.='<font size=+1><b>Current Resource: </b>'.$ENV{'form.probTitle'}.'</font>'."\n"; |
$result.='<font size=+1><b>Current Resource: </b>'.$ENV{'form.probTitle'}.'</font>'."\n"; |
|
|
Line 3198 sub displaySubByDates {
|
Line 3203 sub displaySubByDates {
|
} |
} |
if (exists $$record{"$version:resource.$partid.regrader"}) { |
if (exists $$record{"$version:resource.$partid.regrader"}) { |
$displaySub[2].=$$record{"$version:resource.$partid.regrader"}. |
$displaySub[2].=$$record{"$version:resource.$partid.regrader"}. |
' (<b>Part:</b> '.$partid.')'; |
' (<b>'.&mt('Part').':</b> '.$partid.')'; |
} |
} |
} |
} |
# needed because old essay regrader has not parts info |
# needed because old essay regrader has not parts info |
Line 4311 GRADINGMENUJS
|
Line 4316 GRADINGMENUJS
|
|
|
$result.='<table width="100%" border=0>'; |
$result.='<table width="100%" border=0>'; |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
' Select Section: <select name="section">'."\n"; |
' '.&mt('Select Section').': <select name="section">'."\n"; |
if (ref($sections)) { |
if (ref($sections)) { |
foreach (sort (@$sections)) { |
foreach (sort (@$sections)) { |
$result.='<option value="'.$_.'" '. |
$result.='<option value="'.$_.'" '. |
Line 4320 GRADINGMENUJS
|
Line 4325 GRADINGMENUJS
|
} |
} |
$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.=&mt('Student Status').':</b>'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef); |
|
|
if (ref($sections) && (grep /no/,@$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 />'; |
Line 4329 GRADINGMENUJS
|
Line 4334 GRADINGMENUJS
|
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
'<input type="radio" name="radioChoice" value="submission" '. |
'<input type="radio" name="radioChoice" value="submission" '. |
($saveCmd eq 'submission' ? 'checked' : '').'> '.'<b>Current Resource:</b> For one or more students '. |
($saveCmd eq 'submission' ? 'checked' : '').'> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students'). |
'<select name="submitonly">'. |
' <select name="submitonly">'. |
'<option value="yes" '. |
'<option value="yes" '. |
($saveSub eq 'yes' ? 'selected="on"' : '').'>with submissions</option>'. |
($saveSub eq 'yes' ? 'selected="on"' : '').'>with submissions</option>'. |
'<option value="graded" '. |
'<option value="graded" '. |