version 1.65, 2010/10/07 14:41:49
|
version 1.71, 2012/10/04 13:41:10
|
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 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 663 sub print_course_listing {
|
Line 662 sub print_course_listing {
|
} |
} |
if (keys(%courses) == 0) { |
if (keys(%courses) == 0) { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$output = &mt('No communities match the criteria you selected.'); |
$output = |
|
'<p class="LC_info">' |
|
.&mt('No communities match the criteria you selected.') |
|
.'</p>'; |
} else { |
} else { |
$output = &mt('No courses match the criteria you selected.'); |
$output = |
|
'<p class="LC_info">' |
|
.&mt('No courses match the criteria you selected.') |
|
.'</p>'; |
} |
} |
return $output; |
return $output; |
} |
} |
Line 694 sub construct_data_table {
|
Line 699 sub construct_data_table {
|
$sortname{'Code'} = 'code'; |
$sortname{'Code'} = 'code'; |
$sortname{'Categories'} = 'cats'; |
$sortname{'Categories'} = 'cats'; |
$sortname{'Title'} = 'title'; |
$sortname{'Title'} = 'title'; |
$sortname{'Owner(s)'} = 'owner'; |
$sortname{'Owner & Co-owner(s)'} = 'owner'; |
} |
} |
my $output = &Apache::loncommon::start_data_table(). |
my $output = &Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(); |
&Apache::loncommon::start_data_table_header_row(); |
Line 704 sub construct_data_table {
|
Line 709 sub construct_data_table {
|
} else { |
} else { |
push(@coltitles,'Categories'); |
push(@coltitles,'Categories'); |
} |
} |
push(@coltitles,('Sections','Crosslisted','Title','Owner(s)')); |
push(@coltitles,('Sections','Crosslisted','Title','Owner & Co-owner(s)')); |
if (ref($usersections) eq 'HASH') { |
if (ref($usersections) eq 'HASH') { |
$coltitles[1] = 'Your Section'; |
$coltitles[1] = 'Your Section'; |
} |
} |
Line 799 sub build_courseinfo_hash {
|
Line 804 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 1022 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; |
} |
} |