--- loncom/interface/lonpickcourse.pm 2015/05/21 23:40:09 1.116 +++ loncom/interface/lonpickcourse.pm 2016/11/01 15:47:11 1.121 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.116 2015/05/21 23:40:09 raeburn Exp $ +# $Id: lonpickcourse.pm,v 1.121 2016/11/01 15:47:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,7 +55,7 @@ sub handler { my ($type,$title,$jscript,$multelement,$multiple,$roleelement,$typeelement, $lastaction,$autosubmit,$submitopener,$cloneruname,$clonerudom,$crscode,$crsdom); - # Get course type - Course or Community. + # Get course type - Course, Community or Placement. $type = $env{'form.type'}; if (!defined($env{'form.type'})) { $type = 'Course'; @@ -69,12 +69,12 @@ sub handler { $title = 'Selecting '.$type.'(s)'; } - # if called when a DC is selecting a course - my $roledom = $env{'form.roleelement'}; + # if called when a DC or DH is selecting a course + my ($roledom,$rolename) = split(/:/,$env{'form.roleelement'}); if ($roledom) { - $roleelement = ''; + $roleelement = ''; $submitopener = &processpick(); - $autosubmit = 'process_pick("'.$roledom.'")'; + $autosubmit = 'process_pick("'.$roledom.'","'.$rolename.'")'; } if ($env{'form.typeelement'} ne '') { $typeelement = ''; @@ -288,7 +288,7 @@ sub processpick { } my $process_pick = <<"ENDONE";