version 1.297, 2005/11/22 19:31:43
|
version 1.300, 2005/12/02 19:40:47
|
Line 1844 KEYWORDS
|
Line 1844 KEYWORDS
|
'<input type="hidden" name="newmsg'.$counter.'" value="" />'."\n"; |
'<input type="hidden" name="newmsg'.$counter.'" value="" />'."\n"; |
$result.=' <a href="javascript:msgCenter(document.SCORE,'.$counter. |
$result.=' <a href="javascript:msgCenter(document.SCORE,'.$counter. |
',\''.$msgfor.'\')"; TARGET=_self>'. |
',\''.$msgfor.'\')"; TARGET=_self>'. |
'Compose Message to student'.(scalar(@col_fullnames) >= 1 ? 's' : '').'</a> '. |
&mt('Compose message to student').(scalar(@col_fullnames) >= 1 ? 's' : '').'</a> ('. |
|
&mt('incl. grades').' <input type="checkbox" name="withgrades'.$counter.'" />)'. |
'<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 /> ('. |
if ($env{'form.handgrade'} eq 'yes'); |
&mt('Message will be sent when you click on Save & Next below.').")\n"; |
$request->print($result); |
$request->print($result); |
} |
} |
if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
if ($perm{'vgr'}) { |
$request->print('<br />'. |
$request->print('<br />'. |
&Apache::loncommon::track_student_link(&mt('View recent activity'),$uname,$udom,'check')); |
&Apache::loncommon::track_student_link(&mt('View recent activity'), |
|
$uname,$udom,'check')); |
} |
} |
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { |
if ($perm{'opa'}) { |
$request->print('<br />'. |
$request->print('<br />'. |
&Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$uname,$udom,$symb,'check')); |
&Apache::loncommon::pprmlink(&mt('Set/Change parameters'), |
|
$uname,$udom,$symb,'check')); |
} |
} |
|
|
my %seen = (); |
my %seen = (); |
Line 1974 sub processHandGrade {
|
Line 1977 sub processHandGrade {
|
my $includemsg = $env{'form.includemsg'.$ctr}; |
my $includemsg = $env{'form.includemsg'.$ctr}; |
my ($subject,$message,$msgstatus) = ('','',''); |
my ($subject,$message,$msgstatus) = ('','',''); |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
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'); } |
unless ($subject=~/\w/) { $subject=&mt('Grading Feedback'); } |
my (@msgnum) = split(/,/,$includemsg); |
my (@msgnum) = split(/,/,$includemsg); |
foreach (@msgnum) { |
foreach (@msgnum) { |
$message.=$env{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
$message.=$env{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
} |
} |
$message =&Apache::lonfeedback::clear_out_html($message); |
$message =&Apache::lonfeedback::clear_out_html($message); |
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt; |
if ($env{'form.withgrades'.$ctr}) { |
$message.=" for <a href=\"". |
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt; |
|
$message.=" for <a href=\"". |
&Apache::lonnet::clutter($url). |
&Apache::lonnet::clutter($url). |
"?symb=$symb\">$env{'form.probTitle'}</a>"; |
"?symb=$symb\">$env{'form.probTitle'}</a>"; |
|
} |
$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom, |
$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom, |
$env{'form.msgsub'}.' ['. |
$subject.' ['. |
&Apache::lonnet::declutter($url).']',$message); |
&Apache::lonnet::declutter($url).']',$message); |
$request->print('<br />'.&mt('Sending message to [_1]@[_2]',$uname,$udom).': '. |
$request->print('<br />'.&mt('Sending message to [_1]@[_2]',$uname,$udom).': '. |
$msgstatus); |
$msgstatus); |
Line 2876 sub editgrades {
|
Line 2881 sub editgrades {
|
"$env{'user.name'}:$env{'user.domain'}"; |
"$env{'user.name'}:$env{'user.domain'}"; |
if ($dropMenu eq 'reset status' && |
if ($dropMenu eq 'reset status' && |
$old_score ne '') { # ignore if no previous attempts => nothing to reset |
$old_score ne '') { # ignore if no previous attempts => nothing to reset |
$newrecord{'resource.'.$_.'.tries'} = 0; |
$newrecord{'resource.'.$_.'.tries'} = ''; |
$newrecord{'resource.'.$_.'.solved'} = ''; |
$newrecord{'resource.'.$_.'.solved'} = ''; |
$newrecord{'resource.'.$_.'.award'} = ''; |
$newrecord{'resource.'.$_.'.award'} = ''; |
$newrecord{'resource.'.$_.'.awarded'} = 0; |
$newrecord{'resource.'.$_.'.awarded'} = ''; |
$updateflag = 1; |
$updateflag = 1; |
if ($env{'form.GD_'.$user.'_'.$_.'_aggtries'} > 0) { |
if ($env{'form.GD_'.$user.'_'.$_.'_aggtries'} > 0) { |
my $aggtries = $env{'form.GD_'.$user.'_'.$_.'_aggtries'}; |
my $aggtries = $env{'form.GD_'.$user.'_'.$_.'_aggtries'}; |
Line 5521 sub reset_perm {
|
Line 5526 sub reset_perm {
|
|
|
sub init_perm { |
sub init_perm { |
&reset_perm(); |
&reset_perm(); |
if (!($perm{'vgr'}=&Apache::lonnet::allowed('vgr',$env{'request.course.id'}))) { |
foreach my $test_perm ('vgr','mgr','opa') { |
if ($perm{'vgr'}=&Apache::lonnet::allowed('vgr',$env{'request.course.id'}.'/'.$env{'request.course.sec'})) { |
|
$perm{'vgr_section'}=$env{'request.course.sec'}; |
my $scope = $env{'request.course.id'}; |
} else { |
if (!($perm{$test_perm}=&Apache::lonnet::allowed($test_perm,$scope))) { |
delete($perm{'vgr'}); |
|
} |
$scope .= '/'.$env{'request.course.sec'}; |
} |
if ( $perm{$test_perm}= |
if (!($perm{'mgr'}=&Apache::lonnet::allowed('mgr',$env{'request.course.id'}))) { |
&Apache::lonnet::allowed($test_perm,$scope)) { |
if ($perm{'mgr'}=&Apache::lonnet::allowed('mgr',$env{'request.course.id'}.'/'.$env{'request.course.sec'})) { |
$perm{$test_perm.'_section'}=$env{'request.course.sec'}; |
$perm{'mgr_section'}=$env{'request.course.sec'}; |
} else { |
} else { |
delete($perm{$test_perm}); |
delete($perm{'mgr'}); |
} |
} |
} |
} |
} |
} |
} |