version 1.245, 2009/11/18 11:47:32
|
version 1.251, 2009/11/30 06:32:26
|
Line 62 use Apache::lonlocal;
|
Line 62 use Apache::lonlocal;
|
use Apache::lonnet; |
use Apache::lonnet; |
use LONCAPA; |
use LONCAPA; |
|
|
|
|
|
sub coursepreflink { |
|
my ($text,$category)=@_; |
|
if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { |
|
return '<a href="/adm/courseprefs?phase=display&actions='.$category.'">'.$text.'</a>'; |
|
} else { |
|
return ''; |
|
} |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
Line 111 sub dragmath_button {
|
Line 121 sub dragmath_button {
|
} |
} |
my $buttontext=&mt('Edit Math'); |
my $buttontext=&mt('Edit Math'); |
return <<ENDDRAGMATH; |
return <<ENDDRAGMATH; |
<input type="button" value="$buttontext", onclick="javascript:mathedit('$textarea',document)" />$help_text |
<input type="button" value="$buttontext" onclick="javascript:mathedit('$textarea',document)" />$help_text |
ENDDRAGMATH |
ENDDRAGMATH |
} |
} |
|
|
Line 222 sub select_recent {
|
Line 232 sub select_recent {
|
unless ($value =~/^error\:/) { |
unless ($value =~/^error\:/) { |
my $escaped = &Apache::loncommon::escape_url($value); |
my $escaped = &Apache::loncommon::escape_url($value); |
&Apache::loncommon::inhibit_menu_check(\$escaped); |
&Apache::loncommon::inhibit_menu_check(\$escaped); |
|
if ($area eq 'residx') { |
|
next if ((!&Apache::lonnet::allowed('bre',$value)) && (!&Apache::lonnet::allowed('bro',$value))); |
|
} |
$return.="\n<option value='$escaped'>". |
$return.="\n<option value='$escaped'>". |
&unescape((split(/\&/,$recent{$value}))[1]). |
&unescape((split(/\&/,$recent{$value}))[1]). |
'</option>'; |
'</option>'; |
Line 1128 sub crumbs {
|
Line 1141 sub crumbs {
|
my $output=''; |
my $output=''; |
unless ($noformat) { $output.='<br /><tt><b>'; } |
unless ($noformat) { $output.='<br /><tt><b>'; } |
$output.='<font size="'.$size.'">'.$prefix.'/'; |
$output.='<font size="'.$size.'">'.$prefix.'/'; |
if (($env{'user.adv'}) | ($env{'user.author'})) { |
if (($env{'user.adv'}) || ($env{'user.author'})) { |
my $path=$prefix.'/'; |
my $path=$prefix.'/'; |
foreach my $dir (split('/',$uri)) { |
foreach my $dir (split('/',$uri)) { |
if (! $dir) { next; } |
if (! $dir) { next; } |
Line 1491 returns: nothing
|
Line 1504 returns: nothing
|
$item =~ s/<span(.*?)\/span>//; |
$item =~ s/<span(.*?)\/span>//; |
$html .= "<li>$item</li>"; |
$html .= "<li>$item</li>"; |
} |
} |
$html .= '</li></ul>'; |
$html .= '</ul></li>'; |
if ($category eq 'A') { $html .= "<li>$$links</li>"; } |
if ($category eq 'A') { $html .= "<li>$$links</li>"; } |
} |
} |
$$links = $html.'</ul>'; |
$$links = $html.'</ul>'; |
Line 1871 sub course_custom_roles {
|
Line 1884 sub course_custom_roles {
|
|
|
# topic_bar |
# topic_bar |
# |
# |
# Generates a div containing an (optional) numbered (static) image followed by a |
# Generates a div containing an (optional) number with a white background followed by a |
# title with a background color defined in the corresponding CSS: LC_topic_bar |
# title with a background color defined in the corresponding CSS: LC_topic_bar |
# Inputs: |
# Inputs: |
# 1. number to display (corresponding static image should exist). |
# 1. number to display. |
# img tag will be included if arg is an integer in the range 1 to 9. |
# If input for number is empty only the title will be displayed. |
# 2. title text to display. |
# 2. title text to display. |
# Outputs - a scalar containing html mark-up for the div. |
# Outputs - a scalar containing html mark-up for the div. |
|
|
sub topic_bar { |
sub topic_bar { |
my ($imgnum,$title) = @_; |
my ($num,$title) = @_; |
my $imgtag; |
my $number = ''; |
if ($imgnum =~ /^[1-9]$/) { |
if ($num ne '') { |
$imgtag = '<img src="/res/adm/pages/bl_step'.$imgnum.'.gif"'. |
$number = '<span>'.$num.'</span>'; |
' alt="'.&mt('Step [_1]',$imgnum).'" /> '; |
|
} |
} |
return '<div class="LC_topic_bar">'.$imgtag.$title.'</div>'; |
return '<div class="LC_topic_bar">'.$number.$title.'</div>'; |
} |
} |
|
|
############################################## |
############################################## |
Line 2405 Returns: HTML code with function list en
|
Line 2417 Returns: HTML code with function list en
|
############################################## |
############################################## |
|
|
sub end_funclist { |
sub end_funclist { |
my($r)=@_; |
return "</ul>\n"; |
return "</ul>\n</fieldset>\n"; |
|
} |
} |
|
|
1; |
1; |