version 1.75, 2004/04/22 16:47:26
|
version 1.79, 2004/04/27 18:30:35
|
Line 2671 string honors the validation function, i
|
Line 2671 string honors the validation function, i
|
no strict; |
no strict; |
@ISA = ("Apache::lonhelper::element"); |
@ISA = ("Apache::lonhelper::element"); |
use strict; |
use strict; |
|
use Apache::lonlocal; |
|
|
BEGIN { |
BEGIN { |
&Apache::lonhelper::register('Apache::lonhelper::string', |
&Apache::lonhelper::register('Apache::lonhelper::string', |
Line 3102 sub render {
|
Line 3103 sub render {
|
|
|
# Print the granularity, depending on the action |
# Print the granularity, depending on the action |
if ($vars->{GRANULARITY} eq 'whole_course') { |
if ($vars->{GRANULARITY} eq 'whole_course') { |
$resourceString .= '<li>'.&mt('for').' <b>'.&mt('all resources in the course').'</b></li>'; |
$resourceString .= '<li>'.&mt('for <b>all resources in the course</b>').'</li>'; |
$level = 9; # general course, see lonparmset.pm perldoc |
$level = 9; # general course, see lonparmset.pm perldoc |
$affectedResourceId = "0.0"; |
$affectedResourceId = "0.0"; |
$symb = 'a'; |
$symb = 'a'; |
Line 3113 sub render {
|
Line 3114 sub render {
|
my $title = $res->compTitle(); |
my $title = $res->compTitle(); |
$symb = $res->symb(); |
$symb = $res->symb(); |
$navmap->untieHashes(); |
$navmap->untieHashes(); |
$resourceString .= "<li>for the map named <b>$title</b></li>"; |
$resourceString .= '<li>'.&mt('for the map named [_1]',"<b>$title</b>").'</li>'; |
$level = 8; |
$level = 8; |
$affectedResourceId = $vars->{RESOURCE_ID}; |
$affectedResourceId = $vars->{RESOURCE_ID}; |
$paramlevel = 'map'; |
$paramlevel = 'map'; |
Line 3123 sub render {
|
Line 3124 sub render {
|
$symb = $res->symb(); |
$symb = $res->symb(); |
my $title = $res->compTitle(); |
my $title = $res->compTitle(); |
$navmap->untieHashes(); |
$navmap->untieHashes(); |
$resourceString .= "<li>for the resource named <b>$title</b></li>"; |
$resourceString .= '<li>'.&mt('for the resource named [_1]',"<b>$title</b>").'</li>'; |
$level = 7; |
$level = 7; |
$affectedResourceId = $vars->{RESOURCE_ID}; |
$affectedResourceId = $vars->{RESOURCE_ID}; |
$paramlevel = 'full'; |
$paramlevel = 'full'; |
Line 3176 sub render {
|
Line 3177 sub render {
|
|
|
# Print targets |
# Print targets |
if ($vars->{TARGETS} eq 'course') { |
if ($vars->{TARGETS} eq 'course') { |
$result .= '<li>'.&mt('for').' <b>'.&mt('all students in course').'</b></li>'; |
$result .= '<li>'.&mt('for <b>all students in course</b>').'</li>'; |
} elsif ($vars->{TARGETS} eq 'section') { |
} elsif ($vars->{TARGETS} eq 'section') { |
my $section = $vars->{SECTION_NAME}; |
my $section = $vars->{SECTION_NAME}; |
$result .= "<li>".&mt('for section')." <b>$section</b></li>"; |
$result .= '<li>'.&mt('for section [_1]',"<b>$section</b>").'</li>'; |
$level -= 3; |
$level -= 3; |
$result .= "<input type='hidden' name='csec' value='" . |
$result .= "<input type='hidden' name='csec' value='" . |
HTML::Entities::encode($section,'<>&"') . "' />\n"; |
HTML::Entities::encode($section,'<>&"') . "' />\n"; |
Line 3190 sub render {
|
Line 3191 sub render {
|
# Chop off everything after the last colon (section) |
# Chop off everything after the last colon (section) |
$username = substr($username, 0, rindex($username, ':')); |
$username = substr($username, 0, rindex($username, ':')); |
my $name = $classlist->{$username}->[6]; |
my $name = $classlist->{$username}->[6]; |
$result .= "<li>".&mt('for')." <b>$name</b></li>"; |
$result .= '<li>'.&mt('for [_1]',"<b>$name</b>").'</li>'; |
$level -= 6; |
$level -= 6; |
my ($uname, $udom) = split /:/, $vars->{USER_NAME}; |
my ($uname, $udom) = split /:/, $vars->{USER_NAME}; |
$result .= "<input type='hidden' name='uname' value='". |
$result .= "<input type='hidden' name='uname' value='". |
Line 3201 sub render {
|
Line 3202 sub render {
|
|
|
# Print value |
# Print value |
if ($vars->{ACTION_TYPE} ne 'tries' && $vars->{ACTION_TYPE} ne 'weight') { |
if ($vars->{ACTION_TYPE} ne 'tries' && $vars->{ACTION_TYPE} ne 'weight') { |
$result .= "<li>".&mt('to')." <b>" . ctime($vars->{PARM_DATE}) . "</b> (" . |
$result .= '<li>'.&mt('to [_1] ( [_2] )',"<b>ctime($vars->{PARM_DATE})</b>",Apache::lonnavmaps::timeToHumanString($vars->{PARM_DATE})).'</li>\n'; |
Apache::lonnavmaps::timeToHumanString($vars->{PARM_DATE}) |
|
. ")</li>\n"; |
|
} |
} |
|
|
# print pres_marker |
# print pres_marker |