--- loncom/homework/grades.pm 2005/11/22 19:10:16 1.296
+++ loncom/homework/grades.pm 2005/12/02 19:20:21 1.299
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.296 2005/11/22 19:10:16 www Exp $
+# $Id: grades.pm,v 1.299 2005/12/02 19:20:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1844,13 +1844,22 @@ KEYWORDS
''."\n";
$result.=' '.
- 'Compose Message to student'.(scalar(@col_fullnames) >= 1 ? 's' : '').' '.
+ &mt('Compose message to student').(scalar(@col_fullnames) >= 1 ? 's' : '').' ('.
+ &mt('incl. grades').' )'.
''."\n".
- '
(Message will be sent when you click on Save & Next below.)'."\n"
- if ($env{'form.handgrade'} eq 'yes');
+ '
('.
+ &mt('Message will be sent when you click on Save & Next below.').")\n";
$request->print($result);
}
+ if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
+ $request->print('
'.
+ &Apache::loncommon::track_student_link(&mt('View recent activity'),$uname,$udom,'check'));
+ }
+ if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
+ $request->print('
'.
+ &Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$uname,$udom,$symb,'check'));
+ }
my %seen = ();
my @partlist;
@@ -1879,16 +1888,7 @@ KEYWORDS
# print end of form
if ($counter == $total) {
- my $endform='';
- if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
- $endform.='
'.
- &Apache::loncommon::track_student_link(&mt('View recent activity'),$uname,$udom,'check');
- }
- if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
- $endform.='
'.
- &Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$uname,$udom,$symb,'check');
- }
- $endform.='
'."\n";
+ my $endform=''."\n";
$endform.=' '."\n";
@@ -1975,19 +1975,21 @@ sub processHandGrade {
my $includemsg = $env{'form.includemsg'.$ctr};
my ($subject,$message,$msgstatus) = ('','','');
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) {
- $subject = $env{'form.msgsub'} if ($includemsg =~ /^msgsub/);
+ $subject = $env{'form.msgsub'} if ($includemsg =~ /msgsub/);
unless ($subject=~/\w/) { $subject=&mt('Grading Feedback'); }
my (@msgnum) = split(/,/,$includemsg);
foreach (@msgnum) {
$message.=$env{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne '');
}
$message =&Apache::lonfeedback::clear_out_html($message);
- $message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt;
- $message.=" for 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt;
+ $message.=" for $env{'form.probTitle'}";
+ }
$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom,
- $env{'form.msgsub'}.' ['.
+ $subject.' ['.
&Apache::lonnet::declutter($url).']',$message);
$request->print(' '.&mt('Sending message to [_1]@[_2]',$uname,$udom).': '.
$msgstatus);
@@ -2877,10 +2879,10 @@ sub editgrades {
"$env{'user.name'}:$env{'user.domain'}";
if ($dropMenu eq 'reset status' &&
$old_score ne '') { # ignore if no previous attempts => nothing to reset
- $newrecord{'resource.'.$_.'.tries'} = 0;
+ $newrecord{'resource.'.$_.'.tries'} = '';
$newrecord{'resource.'.$_.'.solved'} = '';
$newrecord{'resource.'.$_.'.award'} = '';
- $newrecord{'resource.'.$_.'.awarded'} = 0;
+ $newrecord{'resource.'.$_.'.awarded'} = '';
$updateflag = 1;
if ($env{'form.GD_'.$user.'_'.$_.'_aggtries'} > 0) {
my $aggtries = $env{'form.GD_'.$user.'_'.$_.'_aggtries'};
|
|