version 1.502, 2007/01/20 22:04:57
|
version 1.506, 2007/02/05 18:40:41
|
Line 1315 Returns a string containing a <select> e
|
Line 1315 Returns a string containing a <select> e
|
|
|
Args: |
Args: |
$name - name of the <select> element |
$name - name of the <select> element |
$value - sclara or array ref of values that should already be selected |
$value - scalar or array ref of values that should already be selected |
$size - number of rows long the select element is |
$size - number of rows long the select element is |
$hash - the elements should be 'option' => 'shown text' |
$hash - the elements should be 'option' => 'shown text' |
(shown text should already have been &mt()) |
(shown text should already have been &mt()) |
$order - (optional) array ref of the order to show the elments in |
$order - (optional) array ref of the order to show the elements in |
|
|
=cut |
=cut |
|
|
Line 1336 sub multiple_select_form {
|
Line 1336 sub multiple_select_form {
|
} |
} |
$output.="\n<select name='$name' size='$size' multiple='1'>"; |
$output.="\n<select name='$name' size='$size' multiple='1'>"; |
my @order; |
my @order; |
if ($order) { |
if (ref($order) eq 'ARRAY') { |
@order = ref($order) ? @$order |
@order = @{$order}; |
: sort(keys(%$hash)); |
} else { |
|
@order = sort(keys(%$hash)); |
} |
} |
if (exists($$hash{'select_form_order'})) { |
if (exists($$hash{'select_form_order'})) { |
@order = @{$$hash{'select_form_order'}}; |
@order = @{$$hash{'select_form_order'}}; |
Line 4952 sub get_course_users {
|
Line 4953 sub get_course_users {
|
$usec = 'none'; |
$usec = 'none'; |
} |
} |
if ($uname ne '' && $udom ne '') { |
if ($uname ne '' && $udom ne '') { |
if ($end < $now) { |
if ($end > 0 && $end < $now) { |
$status = 'previous'; |
$status = 'previous'; |
} elsif ($start > $now) { |
} elsif ($start > $now) { |
$status = 'future'; |
$status = 'future'; |
Line 5394 sub record_sep {
|
Line 5395 sub record_sep {
|
} else { |
} else { |
my @allfields; |
my @allfields; |
if ($env{'form.upfiletype'} eq 'semisv') { |
if ($env{'form.upfiletype'} eq 'semisv') { |
@allfields=split(/;/,$record); |
@allfields=split(/;/,$record,-1); |
} else { |
} else { |
@allfields=split(/\,/,$record); |
@allfields=split(/\,/,$record,-1); |
} |
} |
my $i=0; |
my $i=0; |
my $j; |
my $j; |
Line 6564 sub group_term {
|
Line 6565 sub group_term {
|
|
|
sub icon { |
sub icon { |
my ($file)=@_; |
my ($file)=@_; |
my $curfext = (split(/\./,$file))[-1]; |
my $curfext = lc((split(/\./,$file))[-1]); |
my $iconname=$Apache::lonnet::perlvar{'lonIconsURL'}.'/unknown.gif'; |
my $iconname=$Apache::lonnet::perlvar{'lonIconsURL'}.'/unknown.gif'; |
my $embstyle = &Apache::loncommon::fileembstyle($curfext); |
my $embstyle = &Apache::loncommon::fileembstyle($curfext); |
if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) { |
if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) { |