--- loncom/interface/lonpickcourse.pm 2009/10/31 14:27:48 1.88 +++ loncom/interface/lonpickcourse.pm 2009/11/04 14:12:19 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.88 2009/10/31 14:27:48 raeburn Exp $ +# $Id: lonpickcourse.pm,v 1.90 2009/11/04 14:12:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,7 +51,7 @@ sub handler { ($ENV{'QUERY_STRING'},['domainfilter','form','cnumelement', 'cdomelement','cnameelement','roleelement', 'multiple','type','setroles','fixeddom','cloner']); - my ($type,$title,$jscript,$multelement,$multiple,$roleelement, + my ($type,$title,$jscript,$multelement,$multiple,$roleelement,$typeelement, $lastaction,$autosubmit,$submitopener,$cloneruname,$clonerudom); # Get course type - Course or Community. @@ -75,6 +75,9 @@ sub handler { $submitopener = &processpick(); $autosubmit = 'process_pick("'.$roledom.'")'; } + if ($env{'form.typeelement'} ne '') { + $typeelement = ''; + } # if called when a DC is creating a course if ($env{'form.form'} eq 'ccrs') { @@ -102,10 +105,7 @@ sub handler { if ((($env{'form.form'} eq 'cu') || ($env{'form.form'} eq 'studentform')) && ($env{'form.pickedcourse'})) { - if ($env{'form.form'} eq 'cu') { - $loaditem{'onload'} .= 'setRoles();'; - } - $loaditem{'onload'} .= 'setSections();'; + $loaditem{'onload'} .= 'setRoles();setSections();'; } my $js = &js_changer(); $r->print(&Apache::loncommon::start_page($title,$js, @@ -168,7 +168,7 @@ sub handler { $r->print(&build_filters($filterlist,$type,$roleelement,$multelement, $filter,$action,\$numtitles,undef,$cloneruname, - $clonerudom)); + $clonerudom,$typeelement)); } # ---------------------------------------------------------------- Get the data @@ -300,7 +300,11 @@ sub display_matched_courses { $r->print('