version 1.99.2.1, 2010/01/27 14:35:46
|
version 1.105.2.1, 2012/05/10 19:01:40
|
Line 88 sub handler {
|
Line 88 sub handler {
|
|
|
if ( ! $env{'request.course.fn'} || ! $checkallowed{'whatsnew'}) { |
if ( ! $env{'request.course.fn'} || ! $checkallowed{'whatsnew'}) { |
# Not in a course, or no whn priv in course |
# Not in a course, or no whn priv in course |
$env{'user.error.msg'}="/adm/whatsnew::whn:0:0:Cannot display what's new page"; |
$env{'user.error.msg'}="/adm/whatsnew:whn:0:0:Cannot display what's new page"; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
|
|
Line 348 sub display_actions_box {
|
Line 348 sub display_actions_box {
|
&GDBM_READER(),0640)) { |
&GDBM_READER(),0640)) { |
my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&'); |
my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&'); |
untie(%bighash); |
untie(%bighash); |
$r->print('<span style="font-size: larger;"><a href="'.$furl.'">'.$lt{'gtfr'}. |
$header .= '<b><a href="'.$furl.'">'.$lt{'gtfr'}. |
'</a></span><br />'); |
'</a></b><br />'; |
} |
} |
} |
} |
$r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).'.' |
$header .= &mt('Page set to be displayed after you have selected a role in this '.$lctype).'.' |
.' <span class="LC_nobreak">' |
.' <span class="LC_nobreak">' |
.&mt('Currently: [_1].','<i>'.$currinit.'</i>') |
.&mt('Currently: [_1].','<i>'.$currinit.'</i>') |
.' ' |
.' ' |
Line 363 sub display_actions_box {
|
Line 363 sub display_actions_box {
|
,'</a>' |
,'</a>' |
,'<a href="/adm/preferences?action=changecourseinit&refpage='.$refpage.'">' |
,'<a href="/adm/preferences?action=changecourseinit&refpage='.$refpage.'">' |
,'</a>') |
,'</a>') |
.' </span><br /><hr />'); |
.' </span>'; |
|
|
$r->print(&Apache::loncommon::head_subbox($header)); |
$r->print(&Apache::loncommon::head_subbox($header)); |
|
|
Line 974 sub check_thresholds {
|
Line 974 sub check_thresholds {
|
if ($resource->handgrade($part) eq 'yes') { |
if ($resource->handgrade($part) eq 'yes') { |
next; |
next; |
} |
} |
|
if ($resource->is_anonsurvey($part)) { |
|
next; |
|
} |
if ($resource->is_survey($part)) { |
if ($resource->is_survey($part)) { |
next; |
next; |
} |
} |
Line 996 sub check_thresholds {
|
Line 999 sub check_thresholds {
|
$av_attempts = $attempts/$users; |
$av_attempts = $attempts/$users; |
$av_attempts = sprintf("%.2f",$av_attempts); |
$av_attempts = sprintf("%.2f",$av_attempts); |
} |
} |
|
&Apache::lonnet::statslog($symb,$part,$users,$av_attempts,$degdiff); |
if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) { |
if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) { |
$stats{$part}{degdiff} = $degdiff; |
$stats{$part}{degdiff} = $degdiff; |
$stats{$part}{attempts} = $av_attempts; |
$stats{$part}{attempts} = $av_attempts; |
Line 1166 sub getnormalmail {
|
Line 1170 sub getnormalmail {
|
&Apache::lonmsg::unpackmsgid($msgid); |
&Apache::lonmsg::unpackmsgid($msgid); |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
my $numsendtime = $sendtime; |
|
if ($status eq 'new') { |
if ($status eq 'new') { |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$msgcount ++; |
$msgcount ++; |
Line 1198 sub getcritmail {
|
Line 1201 sub getcritmail {
|
&Apache::lonmsg::unpackmsgid($msgid); |
&Apache::lonmsg::unpackmsgid($msgid); |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
my $numsendtime = $sendtime; |
|
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$critmsgcount ++; |
$critmsgcount ++; |
if ($shortsubj eq '') { |
if ($shortsubj eq '') { |
Line 1433 sub checkversions {
|
Line 1435 sub checkversions {
|
'lastrevisiondate'); |
'lastrevisiondate'); |
$revdate = &Apache::lonlocal::locallocaltime($revdate); |
$revdate = &Apache::lonlocal::locallocaltime($revdate); |
my $linkurl=&Apache::lonnet::clutter($key); |
my $linkurl=&Apache::lonnet::clutter($key); |
my $usedversion=$navmap->usedVersion('version_'.$linkurl); |
my $usedversion=$navmap->usedVersion($linkurl); |
my @resources = $navmap->getResourceByUrl($linkurl,1); |
my @resources = $navmap->getResourceByUrl($linkurl,1); |
if (($usedversion) && ($usedversion ne 'mostrecent')) { |
if (($usedversion) && ($usedversion ne 'mostrecent')) { |
$version = $usedversion; |
$version = $usedversion; |
Line 1476 sub display_handgrade {
|
Line 1478 sub display_handgrade {
|
my $linkurl=&Apache::lonnet::clutter($url); |
my $linkurl=&Apache::lonnet::clutter($url); |
$linkurl .= '?symb='.&escape($res); |
$linkurl .= '?symb='.&escape($res); |
if ($$ungraded{$res}{'enclink'}) { |
if ($$ungraded{$res}{'enclink'}) { |
$linkurl = |
$linkurl = |
$$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; |
$$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; |
} |
} |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |