--- loncom/interface/coursecatalog.pm 2008/07/15 19:43:15 1.40 +++ loncom/interface/coursecatalog.pm 2008/09/23 20:31:09 1.44 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.40 2008/07/15 19:43:15 raeburn Exp $ +# $Id: coursecatalog.pm,v 1.44 2008/09/23 20:31:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,7 +113,7 @@ function setCourseId(caller) { } ENDSCRIPT - $catjs .= &syllabus_javascript(); + $catjs .= &courselink_javascript(); my $numtitles; if ($env{'form.currcat_0'} eq 'instcode::0') { $numtitles = &instcode_course_selector($r,$codedom,$formname,$domdesc, @@ -158,7 +158,7 @@ sub course_details { my %add_entries = (topmargin => "0", marginheight => "0",); my $js = ''."\n"; + &courselink_javascript().''."\n"; my $start_page = &Apache::loncommon::start_page('Course Catalog',$js, { @@ -181,11 +181,12 @@ sub course_details { $r->print('
'); + &Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter', + 'showdetails','courseid']).''); return; } -sub syllabus_javascript { +sub courselink_javascript { return <<"END"; function ToSyllabus(cdom,cnum) { @@ -195,8 +196,17 @@ function ToSyllabus(cdom,cnum) { if (cnum == '' || cnum == null) { return; } - document.syllabuslaunch.action = "/public/"+cdom+"/"+cnum+"/syllabus"; - document.syllabuslaunch.submit(); + document.linklaunch.action = "/public/"+cdom+"/"+cnum+"/syllabus"; + document.linklaunch.submit(); +} + +function ToSelfenroll(courseid) { + if (courseid == '') { + return; + } + document.linklaunch.action = "/adm/selfenroll"; + document.linklaunch.courseid.value = courseid; + document.linklaunch.submit(); } END @@ -388,6 +398,7 @@ sub cat_header { sub category_breadcrumbs { my ($dom,@cats) = @_; + my $crumbsymbol = ' ▶ '; my ($currdepth,$deeper) = &get_depth_values(); my $currcat_str = ''; my $catlinks = ''.$cattitle.'-> | '; + $catlinks .= ''.$cattitle.''.$crumbsymbol.' | '; } if ($deeper == 0) { $catlinks .= ''.&mt('Main Categories').': '; @@ -755,9 +766,10 @@ sub print_course_listing { my %domconfig = &Apache::lonnet::get_dom('configuration',['usercreation'],$domain); $output .= &construct_data_table($knownuser,\%courses,$details,undef,$now,\%domconfig,$trails,$allitems); - $output .= "\n".''; + ''. + &Apache::lonhtmlcommon::echo_form_input(['catalogfilter','courseid']).''; return $output; } @@ -799,7 +811,7 @@ sub construct_data_table { $output .= ' | '.&mt('Default Access Dates for Students').' | '. ''.&mt('Student Counts').' | '. - ''.&mt('Auto-enrollment of registered students').' | ';
+ ''.&mt('Auto-enrollment of[_1]registered students',' ').' | ';
} else {
$output .= ''.&mt('Details').' | '; } @@ -946,10 +958,10 @@ sub build_courseinfo_hash { } } if ($startaccess) { - $accessdates .= &mt('From: ').$startaccess.''.&mt('Starts: [_1]',''.$showstart.'').' '.&mt('Ends: [_1]',''.$showend.'').' | ';
} else {
- $output .= ''.&mt('Enroll in course').' | '; + $output .= ''.&mt('Enroll in course').' | '; } $selfenroll = 1; } @@ -1151,11 +1163,11 @@ sub get_valid_classes { } if ($totalitems > 0) { if (@{$validations{'sections'}}) { - $response = &mt('Sections: '). + $response = &mt('Sections:').' '. join(', ',@{$validations{'sections'}}).'
---|