--- loncom/auth/lonroles.pm 2017/03/13 18:14:13 1.328 +++ loncom/auth/lonroles.pm 2017/06/26 01:57:02 1.332 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.328 2017/03/13 18:14:13 raeburn Exp $ +# $Id: lonroles.pm,v 1.332 2017/06/26 01:57:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -204,7 +204,7 @@ sub handler { my $r = shift; # Check for critical messages and redirect if present. - my ($redirect,$url) = &Apache::loncommon::critical_redirect(300); + my ($redirect,$url) = &Apache::loncommon::critical_redirect(300,'roles'); if ($redirect) { &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => $url); @@ -1097,9 +1097,11 @@ ENDHEADER # ----------------------------------------------------------------------- Table if (($numdc > 0) || (($numhelpdesk > 0) && ($numadhoc > 0))) { - $r->print(&coursepick_jscript()); - $r->print(&Apache::loncommon::coursebrowser_javascript(). - &Apache::loncommon::authorbrowser_javascript()); + $r->print(&coursepick_jscript(). + &Apache::loncommon::coursebrowser_javascript()); + } + if ($numdc > 0) { + $r->print(&Apache::loncommon::authorbrowser_javascript()); } unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { @@ -2063,9 +2065,9 @@ sub adhoc_roles_row { my ($dcdom,$rowtype) = @_; my $output = &Apache::loncommon::continue_data_table_row() .'