--- loncom/interface/coursecatalog.pm 2008/07/15 19:43:15 1.40 +++ loncom/interface/coursecatalog.pm 2009/02/07 18:06:19 1.45 @@ -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.45 2009/02/07 18:06:19 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 @@ -341,6 +351,7 @@ function setElements() { '