version 1.64, 2010/09/07 03:00:38
|
version 1.69, 2011/11/21 15:42:59
|
Line 283 sub instcode_course_selector {
|
Line 283 sub instcode_course_selector {
|
$r->print('<input type="hidden" name="coursenum" value="" />'."\n". |
$r->print('<input type="hidden" name="coursenum" value="" />'."\n". |
'<input type="hidden" name="sortby" value="" />'."\n". |
'<input type="hidden" name="sortby" value="" />'."\n". |
'<input type="hidden" name="state" value="listing" />'."\n". |
'<input type="hidden" name="state" value="listing" />'."\n". |
'<input type="hidden" name="form.currcat_0" value="instcode::0" />'."\n". |
|
'<input type="submit" name="catalogfilter" value="'. |
'<input type="submit" name="catalogfilter" value="'. |
&mt('Display courses').'" />'. |
&mt('Display courses').'" />'. |
'<input type="hidden" name="numtitles" value="'.$numtitles. |
'<input type="hidden" name="numtitles" value="'.$numtitles. |
Line 395 sub category_breadcrumbs {
|
Line 394 sub category_breadcrumbs {
|
$catlinks .= '<option value="">'.&mt('De-select').'</option>'; |
$catlinks .= '<option value="">'.&mt('De-select').'</option>'; |
for (my $j=0; $j<@{$cats[$shallower]{$container}}; $j++) { |
for (my $j=0; $j<@{$cats[$shallower]{$container}}; $j++) { |
my $name = $cats[$shallower]{$container}[$j]; |
my $name = $cats[$shallower]{$container}[$j]; |
my $item = &escape($name).':'.$container.':'.$shallower; |
my $item = &escape($name).':'.&escape($container).':'.$shallower; |
my $selected = ''; |
my $selected = ''; |
if ($item eq $env{'form.currcat_'.$shallower}) { |
if ($item eq $env{'form.currcat_'.$shallower}) { |
$selected = ' selected="selected"'; |
$selected = ' selected="selected"'; |
Line 523 sub additional_filters {
|
Line 522 sub additional_filters {
|
} |
} |
my $selfenroll_text; |
my $selfenroll_text; |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$selfenroll_text = &mt('Only show communities which allow self-enrollment'); |
$selfenroll_text = &mt('Only show communities which currently allow self-enrollment (or will allow it in the future)'); |
} else { |
} else { |
$selfenroll_text = &mt('Only show courses which allow self-enrollment'); |
$selfenroll_text = &mt('Only show courses which currently allow self-enrollment (or will allow it in the future)'); |
} |
} |
$output .= '<tr><td>'. |
$output .= '<tr><td>'. |
'<label><input type="checkbox" name="showselfenroll" value="1" '. |
'<label><input type="checkbox" name="showselfenroll" value="1" '. |
Line 799 sub build_courseinfo_hash {
|
Line 798 sub build_courseinfo_hash {
|
$selfenroll_end = $courses->{$course}{'selfenroll_end_date'}; |
$selfenroll_end = $courses->{$course}{'selfenroll_end_date'}; |
$categories = $courses->{$course}{'categories'}; |
$categories = $courses->{$course}{'categories'}; |
push(@owners,$singleowner); |
push(@owners,$singleowner); |
if (ref($courses->{$course}{'co-owners'}) eq 'ARRAY') { |
if ($courses->{$course}{'co-owners'} ne '') { |
foreach my $item (@{$courses->{$course}{'co-owners'}}) { |
foreach my $item (split(/,/,$courses->{$course}{'co-owners'})) { |
push(@owners,$item); |
push(@owners,$item); |
} |
} |
} |
} |
Line 1017 sub courseinfo_row {
|
Line 1016 sub courseinfo_row {
|
if (($info->{'selfenroll_start'} > 0) && ($info->{'selfenroll_start'} > $now)) { |
if (($info->{'selfenroll_start'} > 0) && ($info->{'selfenroll_start'} > $now)) { |
$output .= '<td>'.&mt('Starts: [_1]','<span class="LC_cusr_emph">'.$showstart.'</span>').'<br />'.&mt('Ends: [_1]','<span class="LC_cusr_emph">'.$showend.'</span>').'</td>'; |
$output .= '<td>'.&mt('Starts: [_1]','<span class="LC_cusr_emph">'.$showstart.'</span>').'<br />'.&mt('Ends: [_1]','<span class="LC_cusr_emph">'.$showend.'</span>').'</td>'; |
} else { |
} else { |
$output .= '<td><a href="javascript:ToSelfenroll('."'$course'".')">'.&mt('Enroll in course').'</a></td>'; |
$output .= '<td><a href="javascript:ToSelfenroll('."'$course'".')">'.&mt('Enroll in course').'</a><br />'; |
|
if ($info->{'selfenroll_end'} == 0) { |
|
$output .= &mt('Available permanently'); |
|
} elsif ($info->{'selfenroll_end'} > $now) { |
|
$output .= &mt('Self-enrollment ends: [_1]','<span class="LC_cusr_emph">'.$showend.'</span>'); |
|
} |
|
$output .= '</td>'; |
} |
} |
$selfenroll = 1; |
$selfenroll = 1; |
} |
} |