version 1.248, 2005/02/18 23:36:12
|
version 1.249, 2005/02/28 21:18:08
|
Line 96 sub get_symb_and_url {
|
Line 96 sub get_symb_and_url {
|
sub nameUserString { |
sub nameUserString { |
my ($type,$fullname,$uname,$udom) = @_; |
my ($type,$fullname,$uname,$udom) = @_; |
if ($type eq 'header') { |
if ($type eq 'header') { |
return '<b> Fullname </b><font color="#999999">(Username)</font> '; |
return '<b> Fullname </b><font color="#999999">(Username)</font> Section/Group'; |
} else { |
} else { |
return ' '.$fullname.'<font color="#999999"> ('.$uname. |
return ' '.$fullname.'<font color="#999999"> ('.$uname. |
($ENV{'user.domain'} eq $udom ? '' : ' ('.$udom.')').')</font>'; |
($ENV{'user.domain'} eq $udom ? '' : ' ('.$udom.')').')</font>'; |
Line 664 LISTJAVASCRIPT
|
Line 664 LISTJAVASCRIPT
|
$gradeTable.='To '.lc($viewgrade).' a submission or a group of submissions, click on the check box(es) '. |
$gradeTable.='To '.lc($viewgrade).' a submission or a group of submissions, click on the check box(es) '. |
'next to the student\'s name(s). Then click on the Next button.<br />'."\n". |
'next to the student\'s name(s). Then click on the Next button.<br />'."\n". |
'<input type="hidden" name="command" value="processGroup" />'."\n"; |
'<input type="hidden" name="command" value="processGroup" />'."\n"; |
|
|
|
# checkall buttons |
|
$gradeTable.=&check_script('gradesub', 'stuinfo'); |
$gradeTable.='<input type="button" '."\n". |
$gradeTable.='<input type="button" '."\n". |
'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n". |
'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n". |
'value="Next->" />'."\n"; |
'value="Next->" /> <br />'."\n"; |
|
$gradeTable.=&check_buttons(); |
$gradeTable.='<input type="checkbox" name="checkPlag" checked="on">Check For Plagiarism</input>'; |
$gradeTable.='<input type="checkbox" name="checkPlag" checked="on">Check For Plagiarism</input>'; |
my (undef, undef, $fullname) = &getclasslist($getsec,'1'); |
my ($classlist, undef, $fullname) = &getclasslist($getsec,'1'); |
$gradeTable.='<table border="0"><tr><td bgcolor="#777777">'. |
$gradeTable.='<table border="0"><tr><td bgcolor="#777777">'. |
'<table border="0"><tr bgcolor="#e6ffff">'; |
'<table border="0"><tr bgcolor="#e6ffff">'; |
my $loop = 0; |
my $loop = 0; |
Line 719 LISTJAVASCRIPT
|
Line 723 LISTJAVASCRIPT
|
} |
} |
|
|
$ctr++; |
$ctr++; |
|
my $section = $classlist->{$student}->[&Apache::loncoursedata::CL_SECTION()]; |
|
|
if ( $perm{'vgr'} eq 'F' ) { |
if ( $perm{'vgr'} eq 'F' ) { |
$gradeTable.='<tr bgcolor="#ffffe6">' if ($ctr%2 ==1); |
$gradeTable.='<tr bgcolor="#ffffe6">' if ($ctr%2 ==1); |
$gradeTable.='<td align="right">'.$ctr.' </td>'. |
$gradeTable.='<td align="right">'.$ctr.' </td>'. |
'<td align="center"><input type=checkbox name="stuinfo" value="'. |
'<td align="center"><label><input type=checkbox name="stuinfo" value="'. |
$student.':'.$$fullname{$student}.' " /></td>'."\n". |
$student.':'.$$fullname{$student}.':::SECTION'.$section. |
'<td>'.&nameUserString(undef,$$fullname{$student},$uname,$udom).'</td>'."\n"; |
') " /> </label></td>'."\n".'<td>'. |
|
&nameUserString(undef,$$fullname{$student},$uname,$udom). |
|
' '.$section.'</td>'."\n"; |
|
|
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { |
foreach (sort keys(%status)) { |
foreach (sort keys(%status)) { |
Line 746 LISTJAVASCRIPT
|
Line 754 LISTJAVASCRIPT
|
$gradeTable.='</tr>'; |
$gradeTable.='</tr>'; |
} |
} |
|
|
$gradeTable.='</table></td></tr></table>'. |
$gradeTable.='</table></td></tr></table>'."\n". |
'<input type="button" '. |
'<input type="button" '. |
'onClick="javascript:checkSelect(this.form.stuinfo);" '. |
'onClick="javascript:checkSelect(this.form.stuinfo);" '. |
'value="Next->" /></form>'."\n"; |
'value="Next->" /></form>'."\n"; |
Line 771 LISTJAVASCRIPT
|
Line 779 LISTJAVASCRIPT
|
} |
} |
|
|
#---- Called from the listStudents routine |
#---- Called from the listStudents routine |
|
|
|
sub check_script { |
|
my ($form, $type)=@_; |
|
my $chkallscript='<script type="text/javascript"> |
|
function checkall() { |
|
for (i=0; i<document.forms.'.$form.'.elements.length; i++) { |
|
ele = document.forms.'.$form.'.elements[i]; |
|
if (ele.name == "'.$type.'") { |
|
document.forms.'.$form.'.elements[i].checked=true; |
|
} |
|
} |
|
} |
|
|
|
function checksec() { |
|
for (i=0; i<document.forms.'.$form.'.elements.length; i++) { |
|
ele = document.forms.'.$form.'.elements[i]; |
|
string = document.forms.'.$form.'.chksec.value; |
|
if |
|
(ele.value.indexOf(":::SECTION"+string)>0) { |
|
document.forms.'.$form.'.elements[i].checked=true; |
|
} |
|
} |
|
} |
|
|
|
|
|
function uncheckall() { |
|
for (i=0; i<document.forms.'.$form.'.elements.length; i++) { |
|
ele = document.forms.'.$form.'.elements[i]; |
|
if (ele.name == "'.$type.'") { |
|
document.forms.'.$form.'.elements[i].checked=false; |
|
} |
|
} |
|
} |
|
|
|
</script>'."\n"; |
|
return $chkallscript; |
|
} |
|
|
|
sub check_buttons { |
|
my $buttons.='<input type="button" onclick="checkall()" value="Check All" />'; |
|
$buttons.='<input type="button" onclick="uncheckall()" value="Uncheck All" /> '; |
|
$buttons.='<input type="button" onclick="checksec()" value="Check Section/Group" />'; |
|
$buttons.='<input type="text" size="5" name="chksec" /> '; |
|
return $buttons; |
|
} |
|
|
# Displays the submissions for one student or a group of students |
# Displays the submissions for one student or a group of students |
sub processGroup { |
sub processGroup { |
my ($request) = shift; |
my ($request) = shift; |