version 1.157, 2006/07/17 16:26:09
|
version 1.159, 2006/12/12 20:41:08
|
Line 1023 sub postprocess {
|
Line 1023 sub postprocess {
|
} |
} |
1; |
1; |
|
|
|
package Apache::lonhelper::helpicon; |
|
|
|
=pod |
|
|
|
=head1 Elements |
|
|
|
=head2 Element: helpiconX<helpicon, helper element> |
|
|
|
Helpicon elements add a help icon at the current location. |
|
Example: |
|
|
|
<helpicon file="Help"> |
|
General Help |
|
</helpicon> |
|
|
|
In this example will generate a help icon to the Help.hlp url with a |
|
description of 'General Help'. The description is not required and if |
|
left out (Example: <helpicon file="Help" /> only the icon will be |
|
added.) |
|
|
|
=head3 Localization |
|
|
|
The description text will be run through the normalize_string function |
|
and that will be used as a call to &mt. |
|
|
|
=cut |
|
|
|
no strict; |
|
@ISA = ("Apache::lonhelper::element"); |
|
use strict; |
|
use Apache::lonlocal; |
|
|
|
BEGIN { |
|
&Apache::lonhelper::register('Apache::lonhelper::helpicon', |
|
('helpicon')); |
|
} |
|
|
|
sub new { |
|
my $ref = Apache::lonhelper::element->new(); |
|
bless($ref); |
|
} |
|
|
|
# CONSTRUCTION: Construct the message element from the XML |
|
sub start_helpicon { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
|
|
if ($target ne 'helper') { |
|
return ''; |
|
} |
|
|
|
$paramHash->{HELP_TEXT} = &mtn(&Apache::lonxml::get_all_text('/helpicon', |
|
$parser)); |
|
|
|
$paramHash->{HELP_TEXT} =~s/^\s+//; |
|
$paramHash->{HELP_TEXT} =~s/\s+$//; |
|
|
|
if (defined($token->[2]{'file'})) { |
|
$paramHash->{HELP_FILE} = $token->[2]{'file'}; |
|
} |
|
return ''; |
|
} |
|
|
|
sub end_helpicon { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
|
|
if ($target ne 'helper') { |
|
return ''; |
|
} |
|
Apache::lonhelper::helpicon->new(); |
|
return ''; |
|
} |
|
|
|
sub render { |
|
my $self = shift; |
|
|
|
my $text; |
|
if ( $self->{HELP_TEXT} ne '') { |
|
$text=&mtn($text); |
|
} |
|
|
|
return &Apache::loncommon::help_open_topic($self->{HELP_FILE}, |
|
$text); |
|
} |
|
1; |
|
|
package Apache::lonhelper::skip; |
package Apache::lonhelper::skip; |
|
|
=pod |
=pod |
Line 2430 sub render {
|
Line 2515 sub render {
|
|
|
# Current personel |
# Current personel |
|
|
$result .= '<h4>Select Currently Enrolled Students and Active Course Personnel</h4>'; |
$result .= '<h4>'.&mt('Select Currently Enrolled Students and Active Course Personnel').'</h4>'; |
$result .= &Apache::lonselstudent::render_student_list( $current_members, |
$result .= &Apache::lonselstudent::render_student_list( $current_members, |
"helpform", |
"helpform", |
"current", |
"current", |
Line 2442 sub render {
|
Line 2527 sub render {
|
|
|
# If activeonly is not set then we can also give the expired students: |
# If activeonly is not set then we can also give the expired students: |
# |
# |
if (!$self->{'activeonly'} && ((scalar @$expired_members) > 0)) { |
if (!$self->{'activeonly'} && ((scalar(@$future_members)) > 0)) { |
|
|
# And future. |
# And future. |
|
|
$result .= '<h4>Select Future Enrolled Students and Future Course Personnel</h4>'; |
$result .= '<h4>'.&mt('Select Future Enrolled Students and Future Course Personnel').'</h4>'; |
|
|
$result .= &Apache::lonselstudent::render_student_list( $future_members, |
$result .= &Apache::lonselstudent::render_student_list( $future_members, |
"helpform", |
"helpform", |
Line 2455 sub render {
|
Line 2540 sub render {
|
$self->{'multichoice'}, |
$self->{'multichoice'}, |
$self->{'variable'}, |
$self->{'variable'}, |
0); |
0); |
|
} |
|
if (!$self->{'activeonly'} && ((scalar(@$expired_members)) > 0)) { |
# Past |
# Past |
|
|
$result .= '<h4>Select Previously Enrolled Students and Inactive Course Personnel</h4>'; |
$result .= '<h4>'.&mt('Select Previously Enrolled Students and Inactive Course Personnel').'</h4>'; |
$result .= &Apache::lonselstudent::render_student_list($expired_members, |
$result .= &Apache::lonselstudent::render_student_list($expired_members, |
"helpform", |
"helpform", |
"past", |
"past", |