--- loncom/interface/lonmodifycourse.pm 2021/06/20 17:27:03 1.79.2.9 +++ loncom/interface/lonmodifycourse.pm 2023/09/04 20:46:02 1.79.2.9.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.79.2.9 2021/06/20 17:27:03 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.79.2.9.2.4 2023/09/04 20:46:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -410,6 +410,8 @@ sub print_modification_menu { 'setanon' => 'View/Modify responders threshold for anonymous survey submissions display', 'selfenroll' => 'View/Modify Self-Enrollment configuration', 'setpostsubmit' => 'View/Modify submit button behavior, post-submission', + 'setltiauth' => 'View/Modify re-authentication requirement for LTI launch of deep-linked item', + 'setexttool' => 'View/Modify External Tools permissions', ); } else { %linktext = ( @@ -417,6 +419,8 @@ sub print_modification_menu { 'setanon' => 'View responders threshold for anonymous survey submissions display', 'selfenroll' => 'View Self-Enrollment configuration', 'setpostsubmit' => 'View submit button behavior, post-submission', + 'setltiauth' => 'View re-authentication requirement for LTI launch of deep-linked item', + 'setexttool' => 'View External Tools permissions', ); } if ($type eq 'Community') { @@ -455,6 +459,8 @@ sub print_modification_menu { my $anon_text = &mt('Responder threshold required to display anonymous survey submissions.'); my $postsubmit_text = &mt('Override defaults for submit button behavior post-submission for this specific course.'); my $mysqltables_text = &mt('Override default for lifetime of "temporary" MySQL tables containing student performance data.'); + my $ltiauth_text = &mt('Override default for requirement for re-authentication for LTI-limited launch of deep-linked item.'); + my $exttool_text = &mt('Override default permissions for external tools use for this specific course.'); $linktext{'viewparms'} = 'Display current settings for automated enrollment'; my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom); @@ -536,6 +542,22 @@ sub print_modification_menu { permission => $permission->{'setpostsubmit'}, linktitle => '', }, + { + linktext => $linktext{'setltiauth'}, + icon => 'system-lock-screen.png', + #help => '', + url => &phaseurl('setltiauth'), + permission => $permission->{'setltiauth'}, + linktitle => '', + }, + { + linktext => $linktext{'setexttool'}, + icon => 'exttool.png', + #help => '', + url => &phaseurl('setexttool'), + permission => $permission->{'setexttool'}, + linktitle => '', + }, ] }, ); @@ -566,7 +588,9 @@ sub print_modification_menu { '
  • '.$setquota_text.'
  • '."\n". '
  • '.$setuploadquota_text.'
  • '."\n". '
  • '.$anon_text.'
  • '."\n". - '
  • '.$postsubmit_text.'
  • '."\n"; + '
  • '.$postsubmit_text.'
  • '."\n". + '
  • '.$ltiauth_text.'
  • '."\n". + '
  • '.$exttool_text.'
  • '."\n"; my ($categories_link_start,$categories_link_end); if ($permission->{'catsettings'} eq 'edit') { $categories_link_start = ''; @@ -751,15 +775,20 @@ sub print_setquota { $cdom,$cnum); my $coursequota = $settings{'internal.coursequota'}; my $uploadquota = $settings{'internal.uploadquota'}; - if ($coursequota eq '') { - $coursequota = $staticdefaults{'coursequota'}; - } - if ($uploadquota eq '') { + if (($uploadquota eq '') || ($coursequota eq '')) { my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings); - $uploadquota = $domdefs{$quotatype.'quota'}; if ($uploadquota eq '') { - $uploadquota = $staticdefaults{'uploadquota'}; + $uploadquota = $domdefs{$quotatype.'quota'}; + if ($uploadquota eq '') { + $uploadquota = $staticdefaults{'uploadquota'}; + } + } + if ($coursequota eq '') { + $coursequota = $domdefs{$quotatype.'coursequota'}; + if ($coursequota eq '') { + $coursequota = $staticdefaults{'coursequota'}; + } } } &print_header($r,$type); @@ -912,15 +941,7 @@ ENDDOCUMENT sub domain_postsubtimeout { my ($cdom,$type,$settings) = @_; return unless (ref($settings) eq 'HASH'); - my $lctype = lc($type); - unless ($type eq 'Community') { - $lctype = 'unofficial'; - if ($settings->{'internal.coursecode'}) { - $lctype = 'official'; - } elsif ($settings->{'internal.textbook'}) { - $lctype = 'textbook'; - } - } + my $lctype = &get_lctype($type,$settings); my %domconfig = &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom); my $postsubtimeout = 60; @@ -936,6 +957,22 @@ sub domain_postsubtimeout { return $postsubtimeout; } +sub get_lctype { + my ($type,$settings) = @_; + my $lctype = lc($type); + unless ($type eq 'Community') { + $lctype = 'unofficial'; + if (ref($settings) eq 'HASH') { + if ($settings->{'internal.coursecode'}) { + $lctype = 'official'; + } elsif ($settings->{'internal.textbook'}) { + $lctype = 'textbook'; + } + } + } + return $lctype; +} + sub print_catsettings { my ($r,$cdom,$cnum,$cdesc,$type,$readonly) = @_; &print_header($r,$type); @@ -1239,6 +1276,199 @@ sub print_selfenrollconfig { return; } +sub print_set_ltiauth { + my ($r,$cdom,$cnum,$cdesc,$type,$readonly) = @_; + my %lt = &Apache::lonlocal::texthash( + 'requ' => 'Requirement for re-authentication for student LTI-limited launch of deep-linked item', + 'link' => 'Link protection can be set to accept username for an enrolled student (if sent by Consumer)', + 'logi' => 'Login needed, regardless of user information sent by LTI Consumer in (signed) parameters', + 'used' => 'Use domain default', + 'cour' => 'Use course-specific setting', + 'curd' => 'Current domain default is', + 'valu' => 'Value for this course', + 'modi' => 'Save', + 'back' => 'Pick another action', + ); + my ($domdef,$checkeddom,$checkedcrs,$domdefdisplay,$divsty,$authok,$authno); + $domdef = 0; + $checkeddom = ' checked="checked"'; + $domdefdisplay = $lt{'logi'}; + $divsty = 'display:none'; + $authno = ' checked="checked"'; + my %domconfig = + &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom); + if (ref($domconfig{'coursedefaults'}) eq 'HASH') { + $domdef = $domconfig{'coursedefaults'}{'ltiauth'}; + } + if ($domdef) { + $domdefdisplay = $lt{'link'}; + } + my %settings = &Apache::lonnet::get('environment',['internal.ltiauth'],$cdom,$cnum); + my $ltiauth = $settings{'internal.ltiauth'}; + + if ($ltiauth ne '') { + $checkedcrs = $checkeddom; + $checkeddom = ''; + $divsty = 'display:inline-block'; + if ($ltiauth) { + $authok = ' checked="checked"'; + } + } + &print_header($r,$type); + my $hidden_elements = &hidden_form_elements(); + my ($disabled,$submit); + if ($readonly) { + $disabled = ' disabled="disabled"'; + } else { + $submit = ''; + } + my $helpitem = &Apache::loncommon::help_open_topic('Modify_Course_LTI_Authen'); + $r->print(< +

    $helpitem $lt{'requ'} $cdesc

    +

    $lt{'curd'}: $domdefdisplay +

    +
    + + +

    +$lt{'valu'} + + +
    + + + +
    +$submit +

    +$hidden_elements +
    $lt{'back'} + +ENDDOCUMENT + return; +} + +sub print_set_exttool { + my ($r,$cdom,$cnum,$cdesc,$type,$readonly) = @_; + my %titles = &exttool_titles($type); + my ($domdef,$domdefdom,$checkeddom,$checkedcrs,$domdefdisplay,$divsty); + $domdef = 0; + $domdefdom = 1; + $checkeddom = ' checked="checked"'; + $divsty = 'display:none'; + my %settings = &Apache::lonnet::get('environment',['internal.coursecode', + 'internal.textbook'],$cdom,$cnum); + my $lctype = &get_lctype($type,\%settings); + my %domconfig = + &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom); + if (ref($domconfig{'coursedefaults'}) eq 'HASH') { + if (ref($domconfig{'coursedefaults'}{'exttool'}) eq 'HASH') { + if (exists($domconfig{'coursedefaults'}{'exttool'}{$lctype})) { + $domdef = $domconfig{'coursedefaults'}{'exttool'}{$lctype}; + } + } + if (ref($domconfig{'coursedefaults'}{'domexttool'}) eq 'HASH') { + if (exists($domconfig{'coursedefaults'}{'domexttool'}{$lctype})) { + $domdefdom = $domconfig{'coursedefaults'}{'domexttool'}{$lctype}; + } + } + } + if ($domdef && $domdefdom) { + $domdefdisplay = $titles{'both'}; + } elsif ($domdef) { + $domdefdisplay = $titles{'crs'}; + } elsif ($domdefdom) { + $domdefdisplay = $titles{'dom'}; + } else { + $domdefdisplay = $titles{'none'}; + } + my %settings = &Apache::lonnet::get('environment',['internal.exttool'],$cdom,$cnum); + my $crsexttool = $settings{'internal.exttool'}; + my %crschecked = ( + both => ' checked="checked"', + dom => '', + crs => '', + none => '', + ); + if ($crsexttool ne '') { + $checkedcrs = $checkeddom; + $checkeddom = ''; + $divsty = 'display:inline-block'; + foreach my $option ('both','dom','crs','none') { + if ($crsexttool eq $option) { + $crschecked{$option} = ' checked="checked"'; + } else { + $crschecked{$option} = ''; + } + } + } + &print_header($r,$type); + my $hidden_elements = &hidden_form_elements(); + my ($disabled,$submit); + if ($readonly) { + $disabled = ' disabled="disabled"'; + } else { + $submit = ''; + } + my $helpitem = &Apache::loncommon::help_open_topic('Modify_Course_External_Tool'); + $r->print(< +

    $helpitem $titles{'extt'}

    +

    $type: $cdesc

    +

    $titles{'curd'}: $domdefdisplay +

    +
    + + +

    +$titles{'valu'} + + +
    + + +
    + + +
    + + + +

    +$submit +

    +$hidden_elements +$titles{'back'} + +ENDDOCUMENT + return; +} + +sub exttool_titles { + my ($type) = @_; + my %titles = &Apache::lonlocal::texthash( + 'extt' => 'External Tool permissions', + 'none' => 'Use of external tools not permitted', + 'crs' => 'Only external tools defined in course may be used', + 'dom' => 'Only external tools defined in domain may be used', + 'both' => 'External tools defined/configured in either domain or course may be used', + 'used' => 'Use domain default', + 'cour' => 'Use course-specific setting', + 'curd' => 'Current domain default is', + 'valu' => 'Value for this course', + 'modi' => 'Save', + 'back' => 'Pick another action', + ); + if ($type eq 'Community') { + $titles{'crs'} = &mt('Only external tools defined in community may be used'); + $titles{'both'} = &mt('External tools defined/configured in either domain or community may be used'); + $titles{'cour'} = &mt('Use community-specific setting'); + $titles{'valu'} = &mt('Value for this community'); + } + return %titles; +} + sub modify_selfenrollconfig { my ($r,$type,$cdesc,$coursehash) = @_; return unless(ref($coursehash) eq 'HASH'); @@ -1302,6 +1532,8 @@ sub gather_authenitems { $curr_authtype = 'int'; } elsif ($enrollvar->{'authtype'} eq 'localauth' ) { $curr_authtype = 'loc'; + } elsif ($enrollvar->{'authtype'} eq 'lti' ) { + $curr_authtype = 'lti'; } } unless ($curr_authtype eq '') { @@ -1322,7 +1554,8 @@ sub gather_authenitems { $authform{'krb'} = &Apache::loncommon::authform_kerberos(%param); $authform{'int'} = &Apache::loncommon::authform_internal(%param); $authform{'loc'} = &Apache::loncommon::authform_local(%param); - foreach my $item ('krb','int','loc') { + $authform{'lti'} = &Apache::loncommon::authform_lti(%param); + foreach my $item ('krb','int','loc','lti') { if ($authform{$item} ne '') { $authenitems .= $authform{$item}.'
    '; } @@ -1393,6 +1626,8 @@ sub modify_course { if ((defined($env{'form.locarg'})) && ($env{'form.locarg'})) { $newattr{'autharg'} = $env{'form.locarg'}; } + } elsif ($env{'form.login'} eq 'lti') { + $newattr{'authtype'} = 'lti'; } if ( $newattr{'authtype'}=~ /^krb/) { if ($newattr{'autharg'} eq '') { @@ -2231,6 +2466,217 @@ sub modify_catsettings { return; } +sub modify_ltiauth { + my ($r,$cdom,$cnum,$cdesc,$domdesc,$type) = @_; + my %lt = &Apache::lonlocal::texthash( + 'requ' => 'Requirement for re-authentication for student LTI-limited launch of deep-linked item', + 'link' => 'Link protection can be set to accept username for an enrolled student (if sent by Consumer)', + 'logi' => 'Login needed, regardless of user information sent by LTI Consumer in (signed) parameters', + 'used' => 'Use domain default', + 'cour' => 'Use course-specific setting', + 'modi' => 'Save', + 'back' => 'Pick another action', + ); + &print_header($r,$type); + $r->print('
    '."\n". + '

    '.$lt{'requ'}. + ' '.$cdesc.'

    '); + my %oldsettings = &Apache::lonnet::get('environment',['internal.ltiauth'],$cdom,$cnum); + my $oldltiauth = $oldsettings{'internal.ltiauth'}; + my $domdef; + my %domconfig = + &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom); + if (ref($domconfig{'coursedefaults'}) eq 'HASH') { + $domdef = $domconfig{'coursedefaults'}{'ltiauth'}; + } + my ($newltiauth,$nochange,$change,$status,$error,$ltiauth); + if ($env{'form.ltiauthset'} eq 'dom') { + if ($oldltiauth eq '') { + $nochange = 1; + } else { + $change = 1; + } + } elsif ($env{'form.ltiauthset'} eq 'course') { + if ($env{'form.ltiauth'} =~ /^0|1$/) { + $newltiauth = $env{'form.ltiauth'}; + } + if ($oldltiauth == $newltiauth) { + $nochange = 1; + } else { + $change = 1; + } + } + if ($change) { + if ($newltiauth ne '') { + my %cenv = ( + 'internal.ltiauth' => $newltiauth, + ); + if (&Apache::lonnet::put('environment',\%cenv,$cdom,$cnum) eq 'ok') { + if ($env{'course.'.$cdom.'_'.$cnum.'.description'} ne '') { + &Apache::lonnet::appenv( + {'course.'.$cdom.'_'.$cnum.'.internal.ltiauth' => $newltiauth}); + } + } else { + $error = 1; + } + } else { + if (&Apache::lonnet::del('environment',['internal.ltiauth'],$cdom,$cnum) eq 'ok') { + if (exists($env{'course.'.$cdom.'_'.$cnum.'.internal.ltiauth'})) { + &Apache::lonnet::delenv('course.'.$cdom.'_'.$cnum.'.internal.ltiauth'); + } + } else { + $error = 1; + } + } + } + if ($error) { + $nochange = 1; + } + if ($nochange) { + $ltiauth = $oldltiauth; + } else { + $ltiauth = $newltiauth; + } + if ($ltiauth eq '') { + $status = $lt{'used'}.': '; + if ($domdef) { + $status .= ''.$lt{'link'}.''; + } else { + $status .= ''.$lt{'logi'}.''; + } + } else { + $status = $lt{'cour'}.': '; + if ($ltiauth) { + $status .= ''.$lt{'link'}.''; + } else { + $status .= ''.$lt{'logi'}.''; + } + } + if ($error) { + $r->print('

    '.&mt('An error occurred when saving your changes').'

    '); + } + $r->print('

    '); + if ($nochange) { + $r->print(&mt('Re-authentication requirement for LTI launch of deep-linked item is unchanged')); + } elsif ($change) { + $r->print(&mt('Re-authentication requirement for LTI launch of deep-linked changed')); + } + $r->print('
    '.$status); + $r->print('

    '. + ''. + $lt{'back'}.'

    '); + $r->print(&hidden_form_elements().'
    '); + return; +} + +sub modify_exttool { + my ($r,$cdom,$cnum,$cdesc,$domdesc,$type) = @_; + my %titles = &exttool_titles($type); + &print_header($r,$type); + $r->print('
    '."\n". + '

    '.$titles{'extt'}.'

    '. + '

    '.$type.': '.$cdesc.'

    '); + my %oldsettings = &Apache::lonnet::get('environment',['internal.exttool'],$cdom,$cnum); + my $oldcrsexttool = $oldsettings{'internal.exttool'}; + my $domdefdom = 1; + my $domdef = 0; + my $domdefdisplay; + my %settings = &Apache::lonnet::get('environment',['internal.coursecode', + 'internal.textbook'],$cdom,$cnum); + my $lctype = &get_lctype($type,\%settings); + my %domconfig = + &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom); + if (ref($domconfig{'coursedefaults'}) eq 'HASH') { + if (ref($domconfig{'coursedefaults'}{'domexttool'}) eq 'HASH') { + if (exists($domconfig{'coursedefaults'}{'domexttool'}{$lctype})) { + $domdefdom = $domconfig{'coursedefaults'}{'domexttool'}{$lctype}; + } + } + if (ref($domconfig{'coursedefaults'}{'exttool'}) eq 'HASH') { + if (exists($domconfig{'coursedefaults'}{'exttool'}{$lctype})) { + $domdef = $domconfig{'coursedefaults'}{'exttool'}{$lctype}; + } + } + } + if ($domdef && $domdefdom) { + $domdefdisplay = $titles{'both'}; + } elsif ($domdef) { + $domdefdisplay = $titles{'crs'}; + } elsif ($domdefdom) { + $domdefdisplay = $titles{'dom'}; + } else { + $domdefdisplay = $titles{'none'}; + } + my ($newcrsexttool,$nochange,$change,$status,$error,$exttool); + if ($env{'form.exttoolset'} eq 'dom') { + if ($oldcrsexttool eq '') { + $nochange = 1; + } else { + $change = 1; + } + } elsif ($env{'form.exttoolset'} eq 'course') { + if ($env{'form.exttool'} =~ /^both|dom|crs|none$/) { + $newcrsexttool = $env{'form.exttool'}; + } + if ($oldcrsexttool eq $newcrsexttool) { + $nochange = 1; + } else { + $change = 1; + } + } + if ($change) { + if ($newcrsexttool ne '') { + my %cenv = ( + 'internal.exttool' => $newcrsexttool, + ); + if (&Apache::lonnet::put('environment',\%cenv,$cdom,$cnum) eq 'ok') { + if ($env{'course.'.$cdom.'_'.$cnum.'.description'} ne '') { + &Apache::lonnet::appenv( + {'course.'.$cdom.'_'.$cnum.'.internal.exttool' => $newcrsexttool}); + } + } else { + $error = 1; + } + } else { + if (&Apache::lonnet::del('environment',['internal.exttool'],$cdom,$cnum) eq 'ok') { + if (exists($env{'course.'.$cdom.'_'.$cnum.'.internal.exttool'})) { + &Apache::lonnet::delenv('course.'.$cdom.'_'.$cnum.'.internal.exttool'); + } + } else { + $error = 1; + } + } + } + if ($error) { + $nochange = 1; + } + if ($nochange) { + $exttool = $oldcrsexttool; + } else { + $exttool = $newcrsexttool; + } + if ($exttool eq '') { + $status = $titles{'used'}.': '.$domdefdisplay.''; + } else { + $status = $titles{'cour'}.': '.$titles{$exttool}.''; + } + if ($error) { + $r->print('

    '.&mt('An error occurred when saving your changes').'

    '); + } + $r->print('

    '); + if ($nochange) { + $r->print(&mt('External Tool permissions unchanged')); + } elsif ($change) { + $r->print(&mt('External Tool permissions changed')); + } + $r->print('
    '.$status); + $r->print('

    '. + ''. + $titles{'back'}.'

    '); + $r->print(&hidden_form_elements().'
    '); + return; +} + sub print_header { my ($r,$type,$javascript_validations) = @_; my $phase = "start"; @@ -2269,9 +2715,10 @@ ENDJS $js .= <<"ENDSCRIPT"; function verify_quota() { - var newquota = document.setquota.coursequota.value; + var newcoursequota = document.setquota.coursequota.value; + var newuploadquota = document.setquota.uploadquota.value; var num_reg = $regexp; - if (num_reg.test(newquota)) { + if ((num_reg.test(newcoursequota)) && (num_reg.test(newuploadquota))) { changePage(document.setquota,'processquota'); } else { alert("$invalid\\n$alert"); @@ -2386,6 +2833,64 @@ function togglePostsubmit(caller) { ENDSCRIPT + } elsif ($phase eq 'setltiauth') { + $js .= <<"ENDJS"; +function toggleLTIOptions(form) { + var radioname = 'ltiauthset'; + var divid = 'crsltiauth'; + var num = form.elements[radioname].length; + if (num) { + var setvis = ''; + for (var i=0; i {'onload' => "hide_searching(); courseSet(document.filterpicker.official, 'load');"}, }; + } elsif ($env{'form.phase'} eq 'setltiauth') { + $starthash = { + add_entries => {'onload' => "toggleLTIOptions(document.setltiauth);"}, + }; + } elsif ($env{'form.phase'} eq 'setexttool') { + $starthash = { + add_entries => {'onload' => "toggleExtToolOptions(document.setexttool);"}, + }; } $r->print(&Apache::loncommon::start_page('View/Modify Course/Community Settings', &Apache::lonhtmlcommon::scripttag($js), @@ -2493,8 +3006,8 @@ sub hidden_form_elements { 'locarg','krbarg','krbver','counter','hidefromcat','usecategory', 'threshold','postsubmit','postsubtimeout','defaultcredits','uploadquota', 'selfenrollmgrdc','selfenrollmgrcc','action','state','currsec_st', - 'sections','newsec','mysqltables','nopasswdchg'], - ['^selfenrollmgr_','^selfenroll_'])."\n". + 'sections','newsec','mysqltables','nopasswdchg','ltiauth','ltiauthset', + 'exttoolset','exttool'],['^selfenrollmgr_','^selfenroll_'])."\n". ''; return $hidden_elements; } @@ -2527,6 +3040,10 @@ sub get_permission { processcat => 'edit', selfenroll => 'edit', adhocrole => 'coord', + setltiauth => 'edit', + processltiauth => 'edit', + setexttool => 'edit', + processexttool => 'edit', ); if ($passwdconf{'crsownerchg'}) { $permission{passwdchg} = 'edit'; @@ -2542,6 +3059,8 @@ sub get_permission { catsettings => 'view', selfenroll => 'view', adhocrole => 'custom', + setltiauth => 'view', + setexttool => 'view', ); if ($passwdconf{'crsownerchg'}) { $permission{passwdchg} = 'view'; @@ -2741,6 +3260,30 @@ sub handler { text=>"Result"}); &modify_selfenrollconfig($r,$type,$cdesc,$coursehash); } + } elsif (($phase eq 'setltiauth') && ($permission->{'setltiauth'})) { + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>"javascript:changePage(document.$phase,'$phase')", + text=>"Requirement for re-authentication for LTI launch of deep-linked item"}); + &print_set_ltiauth($r,$cdom,$cnum,$cdesc,$type,$readonly); + } elsif (($phase eq 'processltiauth') && ($permission->{'processltiauth'})) { + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>"javascript:changePage(document.$phase,'setltiauth')", + text=>"Requirement for re-authentication for LTI launch of deep-linked item"}, + {href=>"javascript:changePage(document.$phase,'$phase')", + text=>"Result"}); + &modify_ltiauth($r,$cdom,$cnum,$cdesc,$domdesc,$type); + } elsif (($phase eq 'setexttool') && ($permission->{'setexttool'})) { + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>"javascript:changePage(document.$phase,'$phase')", + text=>"External Tool permission"}); + &print_set_exttool($r,$cdom,$cnum,$cdesc,$type,$readonly); + } elsif (($phase eq 'processexttool') && ($permission->{'processexttool'})) { + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>"javascript:changePage(document.$phase,'setexttool')", + text=>"External Tool permission"}, + {href=>"javascript:changePage(document.$phase,'$phase')", + text=>"Result"}); + &modify_exttool($r,$cdom,$cnum,$cdesc,$domdesc,$type); } } } else {