version 1.131, 2006/06/01 19:30:49
|
version 1.134, 2006/06/16 22:37:10
|
Line 150 sub get_recent {
|
Line 150 sub get_recent {
|
|
|
# Create hash with key as time and recent as value |
# Create hash with key as time and recent as value |
my %time_hash = (); |
my %time_hash = (); |
|
my $nfrozen = 0; |
foreach (keys %recent) { |
foreach (keys %recent) { |
my $thistime=(split(/\&/,$recent{$_}))[0]; |
my ($thistime,$thisvalue)=(split(/\&/,$recent{$_})); |
|
if (($thisvalue eq 'role_frozen') && ($area='roles')) { |
|
$thistime=time+$nfrozen; |
|
$nfrozen++; |
|
} |
$time_hash{$thistime} = $_; |
$time_hash{$thistime} = $_; |
} |
} |
|
|
Line 160 sub get_recent {
|
Line 165 sub get_recent {
|
my $idx = 1; |
my $idx = 1; |
foreach (reverse sort keys %time_hash) { |
foreach (reverse sort keys %time_hash) { |
$return_hash{$time_hash{$_}} = |
$return_hash{$time_hash{$_}} = |
&unescape((split(/\&/,$recent{$_}))[1]); |
&unescape((split(/\&/,$recent{$time_hash{$_}}))[1]); |
if ($n && ($idx++ >= $n)) {last;} |
if ($n && ($idx++ >= $n)) {last;} |
} |
} |
|
|
Line 283 The method used to restrict user input w
|
Line 288 The method used to restrict user input w
|
############################################## |
############################################## |
sub date_setter { |
sub date_setter { |
my ($formname,$dname,$currentvalue,$special,$includeempty,$state, |
my ($formname,$dname,$currentvalue,$special,$includeempty,$state, |
$no_hh_mm_ss,$defhour,$defmin,$defsec) = @_; |
$no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink) = @_; |
my $wasdefined=1; |
my $wasdefined=1; |
if (! defined($state) || $state ne 'disabled') { |
if (! defined($state) || $state ne 'disabled') { |
$state = ''; |
$state = ''; |
Line 431 ENDJS
|
Line 436 ENDJS
|
$hourselector .= " </select>\n"; |
$hourselector .= " </select>\n"; |
my $minuteselector = qq{<input type="text" name="$dname\_minute" $special $state value="$min" size="3" />}; |
my $minuteselector = qq{<input type="text" name="$dname\_minute" $special $state value="$min" size="3" />}; |
my $secondselector= qq{<input type="text" name="$dname\_second" $special $state value="$sec" size="3" />}; |
my $secondselector= qq{<input type="text" name="$dname\_second" $special $state value="$sec" size="3" />}; |
my $cal_link = qq{<a href="javascript:$dname\_opencalendar()">}; |
my $cal_link; |
|
if (!$nolink) { |
|
$cal_link = qq{<a href="javascript:$dname\_opencalendar()">}; |
|
} |
# |
# |
if ($no_hh_mm_ss) { |
if ($no_hh_mm_ss) { |
$result .= &mt('[_1] [_2] [_3] [_4]Select Date[_5]', |
$result .= &mt('[_1] [_2] [_3] ', |
$monthselector,$dayselector,$yearselector, |
$monthselector,$dayselector,$yearselector); |
$cal_link,'</a>'); |
if (!$nolink) { |
|
$result .= &mt('[_4]Select Date[_5]',$cal_link,'</a>'); |
|
} |
} else { |
} else { |
$result .= &mt('[_1] [_2] [_3] [_4] [_5]m [_6]s [_7]Select Date[_8]', |
$result .= &mt('[_1] [_2] [_3] [_4] [_5]m [_6]s ', |
$monthselector,$dayselector,$yearselector, |
$monthselector,$dayselector,$yearselector, |
$hourselector,$minuteselector,$secondselector, |
$hourselector,$minuteselector,$secondselector); |
$cal_link,'</a>'); |
if (!$nolink) { |
|
$result .= &mt('[_7]Select Date[_8]',$cal_link,'</a>'); |
|
} |
} |
} |
$result .= "</nobr>\n<!-- end $dname date setting form -->\n"; |
$result .= "</nobr>\n<!-- end $dname date setting form -->\n"; |
return $result; |
return $result; |
Line 948 sub r_print {
|
Line 960 sub r_print {
|
# ------------------------------------------------------- Puts directory header |
# ------------------------------------------------------- Puts directory header |
|
|
sub crumbs { |
sub crumbs { |
my ($uri,$target,$prefix,$form,$size,$noformat)=@_; |
my ($uri,$target,$prefix,$form,$size,$noformat,$skiplast)=@_; |
if (! defined($size)) { |
if (! defined($size)) { |
$size = '+2'; |
$size = '+2'; |
} |
} |
Line 964 sub crumbs {
|
Line 976 sub crumbs {
|
foreach my $dir (split('/',$uri)) { |
foreach my $dir (split('/',$uri)) { |
if (! $dir) { next; } |
if (! $dir) { next; } |
$path .= $dir; |
$path .= $dir; |
unless ($path eq $uri) { $path.='/'; } |
if ($path eq $uri) { |
|
if ($skiplast) { |
|
$output.=$dir; |
|
last; |
|
} |
|
} else { |
|
$path.='/'; |
|
} |
my $linkpath = &Apache::loncommon::escape_single($path); |
my $linkpath = &Apache::loncommon::escape_single($path); |
if ($form) { |
if ($form) { |
$linkpath= |
$linkpath= |