'."\n";
$endform.=' '."\n";
+ $total.','.scalar(@partlist).');" target="_self" /> '."\n";
my $ntstu =''.
'1 2 '.
'3 5 '.
@@ -2084,9 +2085,9 @@ KEYWORDS
$ntstu =~ s/$nsel $nsel;
$endform.=$ntstu.'student(s) ';
$endform.=' '."\n".
+ 'onClick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> '."\n".
' ';
+ 'onClick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> ';
$endform.='(Next and Previous (student) do not save the scores.)'."\n" ;
$endform.=" ";
@@ -2168,18 +2169,10 @@ sub processHandGrade {
}
my $includemsg = $env{'form.includemsg'.$ctr};
my ($subject,$message,$msgstatus) = ('','','');
- my $restitle = &Apache::lonnet::gettitle($symb);
- my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl',
- $symb,$udom,$uname);
- my ($feedurl,$baseurl,$showsymb,$messagetail);
- $feedurl = &Apache::lonnet::clutter($url);
- if ($encrypturl =~ /^yes$/i) {
- $baseurl = &Apache::lonenc::encrypted($feedurl,1);
- $showsymb = &Apache::lonenc::encrypted($symb,1);
- } else {
- $baseurl = $feedurl;
- $showsymb = $symb;
- }
+ my $restitle = &Apache::lonnet::gettitle($symb);
+ my ($feedurl,$showsymb) =
+ &get_feedurl_and_symb($symb,$uname,$udom);
+ my $messagetail;
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) {
$subject = $env{'form.msgsub'} if ($includemsg =~ /msgsub/);
unless ($subject=~/\w/) { $subject=&mt('Grading Feedback'); }
@@ -2192,12 +2185,12 @@ sub processHandGrade {
if ($env{'form.withgrades'.$ctr}) {
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt;
$messagetail = " for $env{'form.probTitle'} ";
+ $feedurl."?symb=$showsymb\">$env{'form.probTitle'}";
}
$msgstatus =
&Apache::lonmsg::user_normal_msg($uname,$udom,$subject,
$message.$messagetail,
- undef,$baseurl,undef,
+ undef,$feedurl,undef,
undef,undef,$showsymb,
$restitle);
$request->print(' '.&mt('Sending message to [_1]:[_2]',$uname,$udom).': '.
@@ -2214,26 +2207,16 @@ sub processHandGrade {
if ($errorflag eq 'not_allowed') {
$request->print("".&mt('Not allowed to modify grades for [_1]',"$collaborator:$udom")." ");
next;
- } else {
- if ($message ne '') {
- $encrypturl=
- &Apache::lonnet::EXT('resource.0.encrypturl',
- $symb,$udom,$collaborator);
- if ($encrypturl =~ /^yes$/i) {
- $baseurl = &Apache::lonenc::encrypted($feedurl,1);
- $showsymb = &Apache::lonenc::encrypted($symb,1);
- } else {
- $baseurl = $feedurl;
- $showsymb = $symb;
- }
- if ($env{'form.withgrades'.$ctr}) {
- $messagetail = " for $env{'form.probTitle'} ";
-
- }
- $msgstatus =
- &Apache::lonmsg::user_normal_msg($collaborator,$udom,$subject,$message.$messagetail,undef,$baseurl,undef,undef,undef,$showsymb,$restitle);
}
+ $msgstatus =
+ &Apache::lonmsg::user_normal_msg($collaborator,$udom,$subject,$message.$messagetail,undef,$baseurl,undef,undef,undef,$showsymb,$restitle);
}
}
}
@@ -2587,28 +2570,31 @@ sub handback_files {
$message .= "".&Apache::lonnet::gettitle($symb)." ";
$message .= ' The returned file(s) are named: '. $file_msg;
$message .= " and can be found in your portfolio space.";
- my $url = (&Apache::lonnet::decode_symb($symb))[2];
- my $feedurl = &Apache::lonnet::clutter($url);
- my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl',
- $symb,$domain,$stuname);
- my ($baseurl,$showsymb);
- if ($encrypturl =~ /^yes$/i) {
- $baseurl = &Apache::lonenc::encrypted($feedurl,1);
- $showsymb = &Apache::lonenc::encrypted($symb,1);
- } else {
- $baseurl = $feedurl;
- $showsymb = $symb;
- }
+ my ($feedurl,$showsymb) =
+ &get_feedurl_and_symb($symb,$domain,$stuname);
my $restitle = &Apache::lonnet::gettitle($symb);
my $msgstatus =
&Apache::lonmsg::user_normal_msg($stuname,$domain,$subject.
' (File Returned) ['.$restitle.']',$message,undef,
- $baseurl,undef,undef,undef,$showsymb,$restitle);
+ $feedurl,undef,undef,undef,$showsymb,$restitle);
}
}
return;
}
+sub get_feedurl_and_symb {
+ my ($symb,$uname,$udom) = @_;
+ my (undef,undef,$url) = &Apache::lonnet::decode_symb($symb);
+ $url = &Apache::lonnet::clutter($url);
+ my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl',
+ $symb,$udom,$uname);
+ if ($encrypturl =~ /^yes$/i) {
+ &Apache::lonenc::encrypted(\$url,1);
+ &Apache::lonenc::encrypted(\$symb,1);
+ }
+ return ($url,$symb);
+}
+
sub get_submitted_files {
my ($udom,$uname,$partid,$respid,$record) = @_;
my @files;
@@ -2969,7 +2955,7 @@ sub viewgrades {
#beginning of class grading form
$result.= ' '.''."\n".
'