--- loncom/interface/lonpickcourse.pm 2007/11/28 17:36:11 1.67.2.1 +++ loncom/interface/lonpickcourse.pm 2008/01/02 11:25:38 1.67.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.67.2.1 2007/11/28 17:36:11 albertel Exp $ +# $Id: lonpickcourse.pm,v 1.67.2.2 2008/01/02 11:25:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,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 @@ -215,9 +215,30 @@ sub display_matched_courses { if ($env{'form.form'} eq 'portform') { $action = '/adm/portfolio'; } + my $numcourses = keys(%courses); $r->print('
'); + if ($env{'form.form'} eq 'modifycourse') { + if ($numcourses > 0) { + my $cctitle = &Apache::lonnet::plaintext('cc',$type); + my $dctitle = &Apache::lonnet::plaintext('dc'); + my $ccrolechk = ' checked="checked" '; + my $menuchk = ' '; + if ($env{'form.prevphase'} ne '') { + $ccrolechk = ' '; + $menuchk = ' checked="checked" '; + } + $r->print( + ''.(' 'x3).'
'. + '

'); + } + } my %by_descrip; - my $numcourses = keys(%courses); foreach my $course (keys(%courses)) { my $descr; if (ref($courses{$course}) eq 'HASH') { @@ -260,7 +281,7 @@ sub display_matched_courses { } my $owner = join(', ',@owners); $r->print(&course_chooser($multiple,$cdom,$cnum,$cleandesc)); - $r->print($description.'('. + $r->print($description.' ('. (&Apache::lonnet::domain($cdom,'description')? &Apache::lonnet::domain($cdom,'description'):$cdom).")"); if ($instcode ne '') { @@ -272,7 +293,7 @@ sub display_matched_courses { $r->print(', '.&mt('owner').' - '.$owner); } if ($ttype ne '') { - $r->print('('.&unescape($ttype).')'); + $r->print(' ('.&unescape($ttype).')'); } if ($multiple) { $r->print("\n"); } $r->print("
\n"); @@ -296,7 +317,6 @@ sub display_matched_courses { $r->print(''); $r->print(''); } elsif ($env{'form.form'} eq 'modifycourse') { - $r->print(''."\n"); $r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','pickedcourse','type','form'])); } else { $r->print(' |; if ($formname eq 'modifycourse') { - $output .= ''; - } else { + $output .= ''."\n". + ''."\n"; + } else { my $name_input; if ($env{'form.cnameelement'} ne '') { $name_input = '