'.
- &mt('Disable changing password for users with student role by course owner').''."\n".
+ &mt('Disable changing password for users with student role by course owner').' '."\n".
&Apache::lonhtmlcommon::row_closure());
}
}
@@ -1174,7 +1216,7 @@ sub print_course_modification_page {
''.$lt{'whom'}.' '.
&Apache::loncommon::end_data_table_header_row()."\n");
my %optionname;
- $optionname{''} = &mt('Use domain default');
+ $optionname{''} = &mt('Use domain default');
$optionname{'0'} = $dctitle;
$optionname{'1'} = $cctitle;
foreach my $item (@{$selfenrollrows}) {
@@ -1189,12 +1231,12 @@ sub print_course_modification_page {
$checked{'1'} = ' checked="checked"';
} else {
$checked{''} = ' checked="checked"';
- }
+ }
$r->print(&Apache::loncommon::start_data_table_row()."\n".
''.$selfenrolltitles->{$item}.' '."\n".
''.&mt('[_1] configures',$default).' '."\n".
'');
- foreach my $option ('','0','1') {
+ foreach my $option ('','0','1') {
$r->print(''.
' '.
@@ -1210,7 +1252,7 @@ sub print_course_modification_page {
' '.&mt('"Temporary" Tables Lifetime (s)'))."\n".
' '.
&Apache::lonhtmlcommon::row_closure(1).
- &Apache::lonhtmlcommon::end_pick_box().''.$hidden_elements);
+ &Apache::lonhtmlcommon::end_pick_box().' '.$hidden_elements);
unless ($readonly) {
$r->print(' print(' value="'.$lt{'gobt'}.'" />');
}
- $r->print('
');
+ $r->print('');
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -1231,14 +1277,257 @@ sub print_selfenrollconfig {
my $cdom = $coursehash->{'domain'};
my %currsettings = &get_selfenroll_settings($coursehash);
&print_header($r,$type);
- $r->print(''.&mt('Self-enrollment with a student role in: [_1]',
- ''.$cdesc.' ').' '."\n");
+ $r->print(''.&mt('Self-enrollment with a student role').' '."\n".
+ ''.&mt($type).': '.$cdesc.' '."\n");
&Apache::loncreateuser::print_selfenroll_menu($r,'domain',$env{'form.pickedcourse'},
$cdom,$cnum,\%currsettings,
&hidden_form_elements(),$readonly);
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
+sub print_default_overrides {
+ my ($r,$cdom,$cnum,$cdesc,$type,$readonly,$item) = @_;
+ my (%titles,$checkeddom,$checkedcrs,$divsty,$currcrsval,$crsdefault,%crschecked,
+ $helpfile,$title,$crselements,@currcrseditors);
+ %titles = &default_overrides_titles($type);
+ my ($title,$domdefdisplay,$settings,$optiontext,$options) =
+ &default_overrides_common($item,$cdom,$cnum,$type,\%titles);
+ $checkeddom = ' checked="checked"';
+ $divsty = 'display:none';
+
+ if ($item eq 'ltiauth') {
+ $helpfile = 'Modify_Course_LTI_Authen';
+ $crsdefault = 0;
+ } else {
+ if ($item eq 'exttool') {
+ $helpfile = 'Modify_Course_External_Tool';
+ $crsdefault = 'both';
+ } elsif ($item eq 'crsauthor') {
+ $helpfile = 'Modify_Course_Crsauthor';
+ $crsdefault = 1;
+ } elsif ($item eq 'crseditors') {
+ $helpfile = 'Modify_Course_Resource_Editors';
+ $crsdefault = 'edit,xml';
+ }
+ }
+ $currcrsval = $settings->{'internal.'.$item};
+ if ($currcrsval ne '') {
+ $checkedcrs = $checkeddom;
+ $checkeddom = '';
+ $divsty = 'display:inline-block';
+ if ($item eq 'crseditors') {
+ @currcrseditors = split(/,/,$currcrsval);
+ }
+ foreach my $option (@{$options}) {
+ if ($item eq 'crseditors') {
+ if (grep(/^\Q$option\E$/,@currcrseditors)) {
+ $crschecked{$option} = ' checked="checked"';
+ }
+ } elsif ($currcrsval eq $option) {
+ $crschecked{$option} = ' checked="checked"';
+ } else {
+ $crschecked{$option} = '';
+ }
+ }
+ } else {
+ if ($item eq 'crseditors') {
+ my %domdefs = &Apache::lonnet::get_domain_defaults($cdom);
+ @currcrseditors = split(/,/,$domdefs{'crseditors'});
+ }
+ foreach my $option (@{$options}) {
+ if ($item eq 'crseditors') {
+ if (grep(/^\Q$option\E$/,@currcrseditors)) {
+ $crschecked{$option} = ' checked="checked"';
+ }
+ } elsif ($crsdefault eq $option) {
+ $crschecked{$option} = ' checked="checked"';
+ } else {
+ $crschecked{$option} = '';
+ }
+ }
+ }
+ my ($disabled,$submit,$inputtype,$separator);
+ if ($readonly) {
+ $disabled = ' disabled="disabled"';
+ } else {
+ $submit = ' ';
+ }
+ if ($item eq 'crseditors') {
+ $inputtype = 'checkbox';
+ $separator = ' 'x2;
+ } else {
+ $inputtype = 'radio';
+ $separator = ' ';
+ }
+ foreach my $option (@{$options}) {
+ $crselements .= ''.
+ ' '.$optiontext->{$option}.' '.
+ ' '.$separator."\n";
+ }
+ &print_header($r,$type);
+ my $hidden_elements = &hidden_form_elements();
+ my $helpitem = &Apache::loncommon::help_open_topic($helpfile);
+ my $showtype = &mt($type);
+ $r->print(<$helpitem $title
+$showtype: $cdesc
+
+ENDDOCUMENT
+ my @actions =
+ (''.
+ $titles{'back'}.' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
+ return;
+}
+
+sub default_overrides_titles {
+ my ($type) = @_;
+ my %titles = &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',
+ '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',
+ 'stan' => "'In-course' authoring of standard LON-CAPA problems",
+ 'perc' => 'Permitted course resource editors',
+ 'edit' => 'Standard editor (Edit)',
+ 'xml' => 'Text editor (EditXML)',
+ 'daxe' => 'Daxe editor (Daxe)',
+ 'on' => 'In-course authoring available',
+ 'off' => 'In-course authoring unavailable',
+ '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 default_overrides_common {
+ my ($item,$cdom,$cnum,$type,$titles) = @_;
+ my ($title,$domdef,$domdefdom,$domdefdisplay,%settings,%optiontext,@options);
+ if ($item eq 'ltiauth') {
+ %settings = &Apache::lonnet::get('environment',['internal.'.$item],$cdom,$cnum);
+ $title = $titles->{'requ'};
+ $domdef = 0;
+ @options = ('0','1');
+ %optiontext = (
+ 0 => $titles->{'logi'},
+ 1 => $titles->{'link'},
+ );
+ } else {
+ %settings =
+ &Apache::lonnet::get('environment',['internal.'.$item,'internal.coursecode',
+ 'internal.textbook'],$cdom,$cnum);
+ if ($item eq 'exttool') {
+ $title = $titles->{'extt'};
+ $domdefdom = 1;
+ $domdef = 0;
+ @options = ('both','dom','crs','none');
+ map { $optiontext{$_} = $titles->{$_}; } @options;
+ } elsif ($item eq 'crsauthor') {
+ $title = $titles->{'stan'};
+ $domdef = 1;
+ @options = ('1','0');
+ %optiontext = (
+ 1 => $titles->{'on'},
+ 0 => $titles->{'off'},
+ );
+ } elsif ($item eq 'crseditors') {
+ $title = $titles->{'perc'};
+ $domdef = 1;
+ @options = ('edit','xml','daxe');
+ map { $optiontext{$_} = $titles->{$_}; } @options;
+ }
+ }
+ my %domconfig =
+ &Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom);
+ if (ref($domconfig{'coursedefaults'}) eq 'HASH') {
+ if (($item eq 'ltiauth') || ($item eq 'crseditors')) {
+ $domdef = $domconfig{'coursedefaults'}{$item};
+ } else {
+ my $lctype = &get_lctype($type,\%settings);
+ if (ref($domconfig{'coursedefaults'}{$item}) eq 'HASH') {
+ if (exists($domconfig{'coursedefaults'}{$item}{$lctype})) {
+ $domdef = $domconfig{'coursedefaults'}{$item}{$lctype};
+ }
+ }
+ if ($item eq 'exttool') {
+ if (ref($domconfig{'coursedefaults'}{'domexttool'}) eq 'HASH') {
+ if (exists($domconfig{'coursedefaults'}{'domexttool'}{$lctype})) {
+ $domdefdom = $domconfig{'coursedefaults'}{'domexttool'}{$lctype};
+ }
+ }
+ }
+ }
+ }
+ if ($item eq 'ltiauth') {
+ if ($domdef) {
+ $domdefdisplay = $titles->{'link'};
+ } else {
+ $domdefdisplay = $titles->{'logi'};
+ }
+ } elsif ($item eq 'exttool') {
+ if ($domdef && $domdefdom) {
+ $domdefdisplay = $titles->{'both'};
+ } elsif ($domdef) {
+ $domdefdisplay = $titles->{'crs'};
+ } elsif ($domdefdom) {
+ $domdefdisplay = $titles->{'dom'};
+ } else {
+ $domdefdisplay = $titles->{'none'};
+ }
+ } elsif ($item eq 'crsauthor') {
+ if ($domdef) {
+ $domdefdisplay = $titles->{'on'};
+ } else {
+ $domdefdisplay = $titles->{'off'};
+ }
+ } elsif ($item eq 'crseditors') {
+ if (ref($domdef) eq 'ARRAY') {
+ if (@{$domdef} == 0) {
+ $domdefdisplay = &mt('No permitted editors');
+ } elsif (@{$domdef} == 1) {
+ $domdefdisplay = $titles->{$domdef->[0]}.' ('.&mt('only').')';
+ } else {
+ $domdefdisplay = join(', ', map { $titles->{$_}; } @{$domdef});
+ }
+ } else {
+ $domdefdisplay = join(', ', map { $titles->{$_}; } ('edit','xml'));
+ }
+ }
+ return ($title,$domdefdisplay,\%settings,\%optiontext,\@options);
+}
+
sub modify_selfenrollconfig {
my ($r,$type,$cdesc,$coursehash) = @_;
return unless(ref($coursehash) eq 'HASH');
@@ -1246,13 +1535,17 @@ sub modify_selfenrollconfig {
my $cdom = $coursehash->{'domain'};
my %currsettings = &get_selfenroll_settings($coursehash);
&print_header($r,$type);
- $r->print(''.&mt('Self-enrollment with a student role in: [_1]',
- ''.$cdesc.' ').' '."\n");
- $r->print('');
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -1284,9 +1577,9 @@ sub modifiable_only_title {
my ($type) = @_;
my $dctitle = &Apache::lonnet::plaintext('dc');
if ($type eq 'Community') {
- return &mt('Community settings modifiable only by [_1] for:',$dctitle);
+ return &mt('Community settings modifiable only by [_1]',$dctitle);
} else {
- return &mt('Course settings modifiable only by [_1] for:',$dctitle);
+ return &mt('Course settings modifiable only by [_1]',$dctitle);
}
}
@@ -1302,12 +1595,14 @@ 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 '') {
$curr_authfield = $curr_authtype.'arg';
}
- my $javascript_validations =
+ my $javascript_validations =
&Apache::lonuserutils::javascript_validations('modifycourse',$krbdefdom,
$curr_authtype,$curr_authfield);
my %param = ( formname => 'document.'.$env{'form.phase'},
@@ -1322,7 +1617,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}.' ';
}
@@ -1340,7 +1636,7 @@ sub modify_course {
unless ($type eq 'Community') {
push(@items,('internal.coursecode','internal.authtype','internal.autharg',
'internal.sectionnums','internal.crosslistings'));
- if (&showcredits($cdom)) {
+ if (&showcredits($cdom)) {
push(@items,'internal.defaultcredits');
}
my %passwdconf = &Apache::lonnet::get_passwdconf($cdom);
@@ -1393,6 +1689,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 '') {
@@ -1461,7 +1759,7 @@ sub modify_course {
$newattr{'courseowner'}=$env{'form.courseowner'};
unless ( $newattr{'courseowner'} eq $currattr{'courseowner'} ) {
$changed{'owner'} = 1;
- }
+ }
}
if ($changed{'owner'} || $changed{'code'} || $changed{'passwd'}) {
@@ -1528,7 +1826,7 @@ sub modify_course {
} else {
if ($env{'course.'.$cdom.'_'.$cnum.'.description'} ne '') {
my %newenv;
- map { $newenv{'course.'.$cdom.'_'.$cnum.'.internal.'.$_} = $newattr{$_}; } @changes;
+ map { $newenv{'course.'.$cdom.'_'.$cnum.'.internal.'.$_} = $newattr{$_}; } @changes;
&Apache::lonnet::appenv(\%newenv);
}
foreach my $attr (@modifiable_params) {
@@ -1587,7 +1885,6 @@ sub modify_course {
if ($course_check eq 'ok') {
my $outcome = &Apache::lonnet::auto_new_course($cnum,$cdom,$inst_course_id,$newattr{'courseowner'},$coowners);
unless ($outcome eq 'ok') {
-
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3] for the following reason: "[_4]".',$description,$newattr{'coursecode'},$instsec,$outcome).' ');
}
} else {
@@ -1651,7 +1948,7 @@ sub modify_course {
$nochgresponse .= " ";
}
my ($warning,$numwarnings);
- my $numwarnings = scalar(@warnings);
+ my $numwarnings = scalar(@warnings);
if ($numwarnings) {
$warning = &mt('The following [quant,_1,warning was,warnings were] generated when applying your changes to automated enrollment:',$numwarnings).'
';
foreach my $warn (@warnings) {
@@ -1665,8 +1962,8 @@ sub modify_course {
$reply = $chgresponse.$nochgresponse.$warning;
}
&print_header($r,$type);
- my $mainheader = &modifiable_only_title($type);
- $reply = ''.$mainheader.' '.$cdesc.' '."\n".
+ $reply = ''.&modifiable_only_title($type).' '."\n".
+ ''.&mt($type).': '.$cdesc.' '."\n".
''.$reply.'
'."\n".
' ';
+ $reply .= ''.
+ ' '.&Apache::lonhtmlcommon::actionbox(\@actions);
$r->print($reply);
return;
}
@@ -1850,10 +2148,9 @@ sub modify_quota {
my ($r,$cdom,$cnum,$cdesc,$domdesc,$type) = @_;
&print_header($r,$type);
my $lctype = lc($type);
- my $headline = &mt("Disk space quotas for $lctype: [_1]",
- ''.$cdesc.' ');
- $r->print('');
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
sub modify_anonsurvey_threshold {
my ($r,$cdom,$cnum,$cdesc,$domdesc,$type) = @_;
&print_header($r,$type);
- $r->print('');
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -2026,18 +2325,19 @@ sub modify_postsubmit_config {
unch => 'Post submission behavior of the Submit button is unchanged.',
erro => 'An error occurred when saving your proposed changes.',
inva => 'An invalid response was recorded.',
- pick => 'Pick another action',
+ back => 'Pick another action',
);
- $r->print('');
+ $r->print(''.&hidden_form_elements().'');
+ my @actions =
+ (''.
+ $lt{'back'}.' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -2107,16 +2408,16 @@ sub modify_catsettings {
$desc{'categories'} = &mt('Assigned categories for this course');
$ccrole = 'cc';
}
- $r->print('
-');
+ $r->print(' '.&hidden_form_elements().'');
+ my @actions =
+ (''.
+ &mt('Pick another action').' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
+ return;
+}
+
+sub modify_default_overrides {
+ my ($r,$cdom,$cnum,$cdesc,$domdesc,$type,$item) = @_;
+ my (%titles,$oldcrsval,$newcrsval,%resulttext,$itemvalue,$nochange,$change,$status,$error);
+ %titles = &default_overrides_titles($type);
+ my ($title,$domdefdisplay,$oldsettings,$optiontext,$options) =
+ &default_overrides_common($item,$cdom,$cnum,$type,\%titles);
+ $oldcrsval = $oldsettings->{'internal.'.$item};
+ if ($item eq 'ltiauth') {
+ %resulttext =
+ &Apache::lonlocal::texthash(
+ chg => 'Re-authentication requirement for LTI launch of deep-linked changed',
+ nochg => 'Re-authentication requirement for LTI launch of deep-linked item is unchanged',
+ );
+ } elsif ($item eq 'exttool') {
+ %resulttext =
+ &Apache::lonlocal::texthash(
+ chg => 'External Tool permissions changed',
+ nochg => 'External Tool permissions unchanged',
+ );
+ } elsif ($item eq 'crsauthor') {
+ %resulttext =
+ &Apache::lonlocal::texthash(
+ chg => 'In-course authoring permissions changed',
+ nochg => 'In-course authoring permissions unchanged',
+ );
+ } elsif ($item eq 'crseditors') {
+ %resulttext =
+ &Apache::lonlocal::texthash(
+ chg => 'Permitted course resource editors changed',
+ nochg => 'Permitted course resource editors unchanged',
+ );
+ }
+ &print_header($r,$type);
+ $r->print(''.$title.' '."\n".
+ ''.&mt($type).': '.$cdesc.' '."\n".
+ '');
+ my @actions =
+ (''.
+ $titles{'back'}.' ');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -2269,9 +2694,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");
@@ -2316,7 +2742,7 @@ ENDSCRIPT
&js_escape(\$alert);
my $regexp = ' /^\s*\d+\s*$/';
- $js .= <<"ENDSCRIPT";
+ $js .= <<"ENDSCRIPT";
function verify_postsubmit() {
var optionsElement = document.setpostsubmit.postsubmit;
@@ -2348,7 +2774,7 @@ function verify_postsubmit() {
}
} else {
if (currval == 0) {
- verified = 'ok';
+ verified = 'ok';
} else {
alert('$invalid');
return false;
@@ -2366,7 +2792,7 @@ function togglePostsubmit(caller) {
var optionsElement = document.setpostsubmit.postsubmit;
if (document.getElementById(caller)) {
var divitem = document.getElementById(caller);
- var optionsElement = document.setpostsubmit.postsubmit;
+ var optionsElement = document.setpostsubmit.postsubmit;
if (optionsElement.length) {
var currval;
for (var i=0; i {'onload' => "hide_searching(); courseSet(document.filterpicker.official, 'load');"},
+ } elsif ($env{'form.phase'} =~ /^set(ltiauth|exttool|crseditors)$/) {
+ $starthash = {
+ add_entries => {'onload' => "toggleOptions(document.$env{'form.phase'},'$env{'form.phase'}');"},
};
}
$r->print(&Apache::loncommon::start_page('View/Modify Course/Community Settings',
@@ -2406,7 +2878,15 @@ ENDSCRIPT
} else {
$bread_text = 'Course Settings';
}
- $r->print(&Apache::lonhtmlcommon::breadcrumbs($bread_text));
+ my $helpcomponent;
+ if ($env{'form.phase'} eq 'menu') {
+ if ($type eq 'Community') {
+ $helpcomponent = 'Domain_Modify_Community';
+ } else {
+ $helpcomponent = 'Domain_Modify_Course';
+ }
+ }
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs($bread_text,$helpcomponent));
return;
}
@@ -2487,13 +2967,14 @@ sub course_settings_descrip {
}
sub hidden_form_elements {
- my $hidden_elements =
+ my $hidden_elements =
&Apache::lonhtmlcommon::echo_form_input(['gosearch','updater','coursecode',
'prevphase','numlocalcc','courseowner','login','coursequota','intarg',
'locarg','krbarg','krbver','counter','hidefromcat','usecategory',
'threshold','postsubmit','postsubtimeout','defaultcredits','uploadquota',
'selfenrollmgrdc','selfenrollmgrcc','action','state','currsec_st',
- 'sections','newsec','mysqltables','nopasswdchg'],
+ 'sections','newsec','mysqltables','nopasswdchg','ltiauth','ltiauthset',
+ 'exttoolset','exttool','crseditorsset','crseditors'],
['^selfenrollmgr_','^selfenroll_'])."\n".
' ';
return $hidden_elements;
@@ -2527,6 +3008,12 @@ sub get_permission {
processcat => 'edit',
selfenroll => 'edit',
adhocrole => 'coord',
+ setltiauth => 'edit',
+ processltiauth => 'edit',
+ setexttool => 'edit',
+ processexttool => 'edit',
+ setcrseditors => 'edit',
+ processcrseditors => 'edit',
);
if ($passwdconf{'crsownerchg'}) {
$permission{passwdchg} = 'edit';
@@ -2542,6 +3029,9 @@ sub get_permission {
catsettings => 'view',
selfenroll => 'view',
adhocrole => 'custom',
+ setltiauth => 'view',
+ setexttool => 'view',
+ setcrseditors => 'view',
);
if ($passwdconf{'crsownerchg'}) {
$permission{passwdchg} = 'view';
@@ -2609,7 +3099,7 @@ sub handler {
$choose_text = "Choose a community";
} else {
$choose_text = "Choose a course";
- }
+ }
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:changePage(document.$firstform,'')",
text=>"Course/Community search"},
@@ -2657,7 +3147,7 @@ sub handler {
({href=>"javascript:changePage(document.$phase,'$phase')",
text=>$linktext});
&print_setquota($r,$cdom,$cnum,$cdesc,$type,$readonly);
- } elsif (($phase eq 'processquota') && ($permission->{'processquota'})) {
+ } elsif (($phase eq 'processquota') && ($permission->{'processquota'})) {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:changePage(document.$phase,'setquota')",
text=>"Set quota"});
@@ -2736,11 +3226,47 @@ sub handler {
if (!exists($env{'form.state'})) {
&print_selfenrollconfig($r,$type,$cdesc,$coursehash,$readonly);
} elsif ($env{'form.state'} eq 'done') {
- &Apache::lonhtmlcommon::add_breadcrumb
+ &Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:changePage(document.$phase,'$phase')",
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=>"Authentication post-LTI launch"});
+ &print_default_overrides($r,$cdom,$cnum,$cdesc,$type,$readonly,'ltiauth');
+ } elsif (($phase eq 'processltiauth') && ($permission->{'processltiauth'})) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>"javascript:changePage(document.$phase,'setltiauth')",
+ text=>"Authentication post-LTI launch"},
+ {href=>"javascript:changePage(document.$phase,'$phase')",
+ text=>"Result"});
+ &modify_default_overrides($r,$cdom,$cnum,$cdesc,$domdesc,$type,'ltiauth');
+ } elsif (($phase eq 'setexttool') && ($permission->{'setexttool'})) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>"javascript:changePage(document.$phase,'$phase')",
+ text=>"External Tool permission"});
+ &print_default_overrides($r,$cdom,$cnum,$cdesc,$type,$readonly,'exttool');
+ } 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_default_overrides($r,$cdom,$cnum,$cdesc,$domdesc,$type,'exttool');
+ } elsif (($phase eq 'setcrseditors') && ($permission->{'setcrseditors'})) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>"javascript:changePage(document.$phase,'$phase')",
+ text=>"Available course resource editors"});
+ &print_default_overrides($r,$cdom,$cnum,$cdesc,$type,$readonly,'crseditors');
+ } elsif (($phase eq 'processcrseditors') && ($permission->{'processcrseditors'})) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>"javascript:changePage(document.$phase,'setcrseditors')",
+ text=>"Available course resource editors"},
+ {href=>"javascript:changePage(document.$phase,'$phase')",
+ text=>"Result"});
+ &modify_default_overrides($r,$cdom,$cnum,$cdesc,$domdesc,$type,'crseditors');
}
}
} else {