version 1.242, 2009/11/10 13:58:55
|
version 1.248, 2009/11/23 14:04:37
|
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 1473 returns: nothing
|
Line 1483 returns: nothing
|
push @{$tools{$category}}, $html; |
push @{$tools{$category}}, $html; |
} |
} |
|
|
|
sub clear_breadcrumb_tools { |
|
undef(%tools); |
|
} |
|
|
sub add_tools { |
sub add_tools { |
my ($links) = @_; |
my ($links) = @_; |
return unless defined %tools; |
return unless defined %tools; |
Line 1599 END
|
Line 1613 END
|
} |
} |
|
|
sub row_title { |
sub row_title { |
my ($title,$css_title_class,$css_value_class) = @_; |
my ($title,$css_title_class,$css_value_class, $css_value_furtherAttributes) = @_; |
$row_count[0]++; |
$row_count[0]++; |
my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row'; |
my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row'; |
$css_title_class ||= 'LC_pick_box_title'; |
$css_title_class ||= 'LC_pick_box_title'; |
Line 1611 sub row_title {
|
Line 1625 sub row_title {
|
$title .= ':'; |
$title .= ':'; |
} |
} |
my $output = <<"ENDONE"; |
my $output = <<"ENDONE"; |
<tr class="LC_pick_box_row"> |
<tr class="LC_pick_box_row" $css_value_furtherAttributes> |
<td $css_title_class> |
<td $css_title_class> |
$title |
$title |
</td> |
</td> |
Line 1867 sub course_custom_roles {
|
Line 1881 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 2343 Returns: HTML code with function list st
|
Line 2356 Returns: HTML code with function list st
|
sub start_funclist { |
sub start_funclist { |
my($legendtext)=@_; |
my($legendtext)=@_; |
$legendtext=&mt('Functions') if !$legendtext; |
$legendtext=&mt('Functions') if !$legendtext; |
return "<fieldset>\n<legend>$legendtext</legend>\n" |
return '<ul class="LC_funclist"><li style="font-weight:bold; margin-left:0.8em;">'.$legendtext.'</li>'."\n"; |
.'<ul class="LC_funclist">'."\n"; |
|
} |
} |
|
|
|
|
Line 2402 Returns: HTML code with function list en
|
Line 2414 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; |