--- loncom/interface/lonpickcourse.pm 2017/01/03 17:47:57 1.124 +++ loncom/interface/lonpickcourse.pm 2017/04/08 14:28:56 1.127 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.124 2017/01/03 17:47:57 raeburn Exp $ +# $Id: lonpickcourse.pm,v 1.127 2017/04/08 14:28:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,7 +44,7 @@ sub handler { if ($env{'form.context'} eq 'adhoc') { &Apache::loncommon::content_type($r,'application/json'); $r->send_http_header; - my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($env{'form.cid'}); + my ($possroles,$description) = &Apache::lonnet::get_my_adhocroles($env{'form.cid'},1); if ((ref($possroles) eq 'ARRAY') && (ref($description) eq 'HASH')) { my $response = []; if (@{$possroles}) { @@ -89,13 +89,13 @@ sub handler { $title = 'Selecting '.$type.'(s)'; } - # if called when a DC or DH is selecting a course + # if called when a DC, DH or DA is selecting a course my ($roledom,$rolename) = split(/:/,$env{'form.roleelement'}); if ($roledom) { $roleelement = ''; $submitopener = &processpick(); $autosubmit = 'process_pick("'.$roledom.'","'.$rolename.'")'; - if ($rolename eq 'dh') { + if (($rolename eq 'dh') || ($rolename eq 'da')) { my %lt = &Apache::lonlocal::texthash( title => 'Ad hoc role selection', preamble => 'Please choose an ad hoc role in the course.', @@ -103,7 +103,7 @@ sub handler { ); $rolechooser = <<"END"; -
+