version 1.58.4.8.2.1, 2012/02/14 00:29:50
|
version 1.71, 2012/10/04 13:41:10
|
Line 182 sub course_details {
|
Line 182 sub course_details {
|
&courselink_javascript().'</script>'."\n"; |
&courselink_javascript().'</script>'."\n"; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Course/Community Catalog',$js, |
&Apache::loncommon::start_page('Course/Community Catalog',$js, |
{ |
{'add_entries' => \%add_entries, }); |
'add_entries' => \%add_entries, |
|
'no_inline_link' => 1,}); |
|
$r->print($start_page); |
$r->print($start_page); |
if ($env{'form.numtitles'} > 0) { |
if ($env{'form.numtitles'} > 0) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/coursecatalog", |
({href=>"/adm/coursecatalog", |
text=>"Course/Community Catalog"}); |
text=>"Course/Community Catalog"}); |
} |
} |
my $brtextone = 'Course listing'; |
my $brtextone = 'Course listing'; |
my $brtexttwo = 'Course details'; |
my $brtexttwo = 'Course details'; |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$brtextone = 'Community listing'; |
$brtextone = 'Community listing'; |
Line 201 sub course_details {
|
Line 199 sub course_details {
|
({href=>"javascript:document.$formname.submit()", |
({href=>"javascript:document.$formname.submit()", |
text=>$brtextone}, |
text=>$brtextone}, |
{text=>$brtexttwo}); |
{text=>$brtexttwo}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog')); |
$r->print('<br />'); |
$r->print('<br />'); |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$r->print(&mt('Detailed community information:')); |
$r->print(&mt('Detailed community information:')); |
Line 305 sub cat_header {
|
Line 304 sub cat_header {
|
my ($r,$codedom,$js,$add_entries,$catlinks,$numtitles) = @_; |
my ($r,$codedom,$js,$add_entries,$catlinks,$numtitles) = @_; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Other',$js, |
&Apache::loncommon::start_page('Other',$js, |
{ |
{ 'add_entries' => $add_entries, }); |
'add_entries' => $add_entries, |
|
'no_inline_link' => 1,}); |
|
$r->print($start_page); |
$r->print($start_page); |
my $brtext = 'Course listing'; |
my $brtext = 'Course listing'; |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
Line 329 sub cat_header {
|
Line 326 sub cat_header {
|
text=>"Course/Community Catalog"}); |
text=>"Course/Community Catalog"}); |
} |
} |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog')); |
my $onchange; |
my $onchange = 'this.form.submit()'; |
unless ($env{'form.interface'} eq 'textual') { |
$r->print('<form name="coursecatdom" method="post" action="/adm/coursecatalog">'. |
$onchange = 'this.form.submit()'; |
'<table border="0"><tr><td><b>'.&mt('Domain:').'</b></td><td>'. |
} |
&Apache::loncommon::select_dom_form($codedom,'showdom','',1,$onchange)); |
unless ($codedom eq 'relate') { |
if (!$onchange) { |
$r->print('<form name="coursecatdom" method="post" action="/adm/coursecatalog">'. |
$r->print(' <input type="submit" name="godom" value="'.&mt('Change').'" />'); |
'<table border="0"><tr><td><b>'.&mt('Domain:').'</b></td><td>'. |
|
&Apache::loncommon::select_dom_form($codedom,'showdom','',1,$onchange)); |
|
if (!$onchange) { |
|
$r->print(' <input type="submit" name="godom" value="'.&mt('Change').'" />'); |
|
} |
|
$r->print('</td></tr></table></form>'); |
|
} |
} |
$r->print('<form name="coursecats" method="post" action="/adm/coursecatalog"'. |
$r->print('</td></tr></table></form>'. |
|
'<form name="coursecats" method="post" action="/adm/coursecatalog"'. |
' onsubmit="return check_selected();">'. |
' onsubmit="return check_selected();">'. |
'<table border="0"><tr>'.$catlinks.'</tr></table></form>'); |
'<table border="0"><tr>'.$catlinks.'</tr></table></form>'); |
return; |
return; |
Line 530 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 657 sub print_course_listing {
|
Line 649 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('The courseID provided does not match a community in this domain.'); |
$output .= &mt('The courseID provided does not match a community in this domain.'); |
} else { |
} else { |
$output .= &mt('The courseID provided does not match a course in this domain.'); |
$output .= &mt('The courseID provided does not match a course in this domain.'); |
} |
} |
return $output; |
return $output; |
Line 670 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 701 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 711 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 1006 sub courseinfo_row {
|
Line 1004 sub courseinfo_row {
|
if ($details) { |
if ($details) { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
if ($env{'form.currcat_0'} eq 'communities::0') { |
$output .= '<td>'.$accessdates.'</td>'; |
$output .= '<td>'.$accessdates.'</td>'; |
} else { |
} else { |
$output .= |
$output .= |
'<td>'.$accessdates.'</td>'. |
'<td>'.$accessdates.'</td>'. |
'<td>'.$counts.'</td>'. |
'<td>'.$counts.'</td>'. |
'<td>'.$autoenrollment.'</td>'; |
'<td>'.$autoenrollment.'</td>'; |
} |
} |