--- loncom/interface/lonpickcourse.pm 2007/10/22 22:16:38 1.66 +++ loncom/interface/lonpickcourse.pm 2008/07/01 05:26:04 1.73.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.66 2007/10/22 22:16:38 raeburn Exp $ +# $Id: lonpickcourse.pm,v 1.73.2.2 2008/07/01 05:26:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -93,7 +93,8 @@ sub handler { if ($env{'form.form'} eq 'portform') { $lastaction = 'document.courselist.submit()'; - } elsif ($env{'form.form'} eq 'cu' || $env{'form.form'} eq 'studentform') { + } elsif ($env{'form.form'} eq 'cu' || ($env{'form.form'} eq 'studentform' && + !$multiple)) { $lastaction = 'document.courselist.pickedcourse.value = cdom+"_"+cname;'."\n". 'document.courselist.submit();'; @@ -103,7 +104,7 @@ sub handler { # if called to assign a role in a course to a user via CUSR if ($env{'form.form'} eq 'cu' || $env{'form.form'} eq 'studentform') { - $r->print(&create_user_javascript($type)); + $r->print(&create_user_javascript($type)); } # print javascript functions for choosing a course @@ -214,9 +215,39 @@ sub display_matched_courses { if ($env{'form.form'} eq 'portform') { $action = '/adm/portfolio'; } + my $numcourses = keys(%courses); $r->print('
-