version 1.120, 2003/07/19 15:11:27
|
version 1.121, 2003/07/21 13:32:49
|
Line 197 COMMONJSFUNCTIONS
|
Line 197 COMMONJSFUNCTIONS
|
#--- section, ids and fullnames for each user. |
#--- section, ids and fullnames for each user. |
sub getclasslist { |
sub getclasslist { |
my ($getsec,$filterlist) = @_; |
my ($getsec,$filterlist) = @_; |
|
$getsec = $getsec eq '' ? 'all' : $getsec; |
my $classlist=&Apache::loncoursedata::get_classlist(); |
my $classlist=&Apache::loncoursedata::get_classlist(); |
# Bail out if we were unable to get the classlist |
# Bail out if we were unable to get the classlist |
return if (! defined($classlist)); |
return if (! defined($classlist)); |
Line 721 sub sub_page_js {
|
Line 722 sub sub_page_js {
|
return; |
return; |
} |
} |
|
|
//=========== Check that a point is assigned for all the parts (essay grading only) ============ |
//=========== Check that a point is assigned for all the parts ============ |
function checksubmit(formname,val,total,parttot) { |
function checksubmit(formname,val,total,parttot) { |
document.SCORE.gradeOpt.value = val; |
formname.gradeOpt.value = val; |
if (val == "Save & Next") { |
if (val == "Save & Next") { |
for (i=0;i<=total;i++) { |
for (i=0;i<=total;i++) { |
for (j=0;j<parttot;j++) { |
for (j=0;j<parttot;j++) { |
Line 745 sub sub_page_js {
|
Line 746 sub sub_page_js {
|
} |
} |
|
|
} |
} |
formname.submit(); |
if (val == "Grade Student") { |
} |
formname.showgrading.value = "yes"; |
|
if (formname.Status.value == "") { |
//======= Process request to show the grading page from SUBM, CHART buttons |
formname.Status.value = "Active"; |
function gradeStudent(formname,ptr) { |
} |
formname.gradeOpt.value = 'Grade Student'; |
formname.studentNo.value = total; |
formname.showgrading.value = "yes"; |
} |
formname.studentNo.value = ptr; |
|
formname.submit(); |
formname.submit(); |
} |
} |
|
|
Line 1441 KEYWORDS
|
Line 1441 KEYWORDS
|
'Apache::grades::keywords_highlight')); |
'Apache::grades::keywords_highlight')); |
} |
} |
|
|
$result='<input type="hidden" name="newmsg'.$counter.'" value="" />'."\n". |
$request->print('<input type="hidden" name="unamedom'.$counter.'" value="'.$uname.':' |
'<input type="hidden" name="includemsg'.$counter.'" value="" />'."\n". |
.$udom.'" />'."\n"); |
'<input type="hidden" name="unamedom'.$counter.'" value="'.$uname.':' |
|
.$udom.'" />'."\n"; |
|
$request->print($result); |
|
|
|
# return if view submission with no grading option |
# return if view submission with no grading option |
if ($ENV{'form.showgrading'} eq '' || (!&canmodify($usec))) { |
if ($ENV{'form.showgrading'} eq '' || (!&canmodify($usec))) { |
my $toGrade.='<input type="button" value="Grade Student" '. |
my $toGrade.='<input type="button" value="Grade Student" '. |
'onClick="javascript:gradeStudent(this.form,\''.$counter.'\');" TARGET=_self> '."\n"; |
'onClick="javascript:checksubmit(this.form,\'Grade Student\',\'' |
|
.$counter.'\');" TARGET=_self> '."\n" if (&canmodify($usec)); |
$toGrade.='</td></tr></table></td></tr></table></form>'."\n"; |
$toGrade.='</td></tr></table></td></tr></table></form>'."\n"; |
$toGrade.=&show_grading_menu_form($symb,$url) |
$toGrade.=&show_grading_menu_form($symb,$url) |
if (($ENV{'form.command'} eq 'submission') || |
if (($ENV{'form.command'} eq 'submission') || |
Line 1459 KEYWORDS
|
Line 1457 KEYWORDS
|
return; |
return; |
} |
} |
|
|
# essay grading options |
# essay grading message center |
if ($ENV{'form.handgrade'} eq 'yes') { |
if ($ENV{'form.handgrade'} eq 'yes') { |
my ($lastname,$givenn) = split(/,/,$ENV{'form.fullname'}); |
my ($lastname,$givenn) = split(/,/,$ENV{'form.fullname'}); |
my $msgfor = $givenn.' '.$lastname; |
my $msgfor = $givenn.' '.$lastname; |
Line 1469 KEYWORDS
|
Line 1467 KEYWORDS
|
} |
} |
$msgfor =~ s/\'/\\'/g; #' stupid emacs - no! javascript |
$msgfor =~ s/\'/\\'/g; #' stupid emacs - no! javascript |
# $result.='<tr><td bgcolor="#ffffff">'."\n". |
# $result.='<tr><td bgcolor="#ffffff">'."\n". |
$result=' <a href="javascript:msgCenter(document.SCORE,'.$counter. |
$result='<input type="hidden" name="includemsg'.$counter.'" value="" />'."\n". |
|
'<input type="hidden" name="newmsg'.$counter.'" value="" />'."\n"; |
|
$result.=' <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'). |
'<img src="'.$request->dir_config('lonIconsURL'). |
'/mailbkgrd.gif" width="14" height="10" name="mailicon'.$counter.'" />'."\n". |
'/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); |
|
|
|
my %seen = (); |
my %seen = (); |
my @partlist; |
my @partlist; |
Line 1503 KEYWORDS
|
Line 1503 KEYWORDS
|
# print end of form |
# print end of form |
if ($counter == $total) { |
if ($counter == $total) { |
my $endform='<table border="0"><tr><td>'."\n"; |
my $endform='<table border="0"><tr><td>'."\n"; |
# '<input type="hidden" name="gradeOpt" value="" />'."\n"; |
|
$endform.='<input type="button" value="Save & Next" '. |
$endform.='<input type="button" value="Save & Next" '. |
'onClick="javascript:checksubmit(this.form,\'Save & Next\','. |
'onClick="javascript:checksubmit(this.form,\'Save & Next\','. |
$total.','.scalar(@partlist).');" TARGET=_self> '."\n"; |
$total.','.scalar(@partlist).');" TARGET=_self> '."\n"; |
Line 1666 sub processHandGrade {
|
Line 1665 sub processHandGrade {
|
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
} |
} |
# Called by Save & Refresh from Highlight Attribute Window |
# Called by Save & Refresh from Highlight Attribute Window |
# my (undef,undef,$fullname) = &getclasslist($ENV{'form.section'},'0'); |
|
my (undef,undef,$fullname) = &getclasslist($ENV{'form.section'},'1'); |
my (undef,undef,$fullname) = &getclasslist($ENV{'form.section'},'1'); |
if ($ENV{'form.refresh'} eq 'on') { |
if ($ENV{'form.refresh'} eq 'on') { |
my ($ctr,$total) = (0,0); |
my ($ctr,$total) = (0,0); |
Line 1686 sub processHandGrade {
|
Line 1684 sub processHandGrade {
|
return ''; |
return ''; |
} |
} |
|
|
# Go directly to grade student - from submission page |
# Go directly to grade student - from submission or link from chart page |
if ($button eq 'Grade Student') { |
if ($button eq 'Grade Student') { |
|
(undef,undef,$ENV{'form.handgrade'},undef,undef) = &showResourceInfo($url); |
my $processUser = $ENV{'form.unamedom'.$ENV{'form.studentNo'}}; |
my $processUser = $ENV{'form.unamedom'.$ENV{'form.studentNo'}}; |
($ENV{'form.student'},$ENV{'form.userdom'}) = split(/:/,$processUser); |
($ENV{'form.student'},$ENV{'form.userdom'}) = split(/:/,$processUser); |
$ENV{'form.fullname'} = $$fullname{$processUser}; |
$ENV{'form.fullname'} = $$fullname{$processUser}; |