';
}
}
if ($links_def) {
@@ -1852,17 +1852,15 @@ sub image_changes {
my ($is_custom,$alt_text,$img_import,$showfile,$fullsize,$role,$img,$imgfile,$logincolors) = @_;
my $output;
if ($img eq 'login') {
- # suppress image for Log-in header
+ $output = '
'.$logincolors; # suppress image for Log-in header
} elsif (!$is_custom) {
if ($img ne 'domlogo') {
- $output .= &mt('Default image:').' ';
+ $output = &mt('Default image:').' ';
} else {
- $output .= &mt('Default in use:').' ';
+ $output = &mt('Default in use:').' ';
}
}
- if ($img eq 'login') { # suppress image for Log-in header
- $output .= '
'.$logincolors;
- } else {
+ if ($img ne 'login') {
if ($img_import) {
$output .= '';
}
@@ -2909,6 +2907,35 @@ function toggleLTI(form,setting,item) {
}
}
}
+ } else if (setting == 'lcmenu') {
+ var menus = new Array('lti_topmenu_'+item,'lti_inlinemenu_'+item);
+ var divid = 'lti_menufield_'+item;
+ var setvis = '';
+ for (var i=0; i'.&mt('Failsafe for no drops when institutional data missing').'
'.
'
'.
'
';
+ ' value="'.$failsafe.'" size="4" />';
$$rowtotal += 4;
return $datatable;
}
@@ -4693,6 +4720,8 @@ sub lti_names {
'other' => 'Other',
'passback' => 'Can return grades to Consumer:',
'roster' => 'Can retrieve roster from Consumer:',
+ 'topmenu' => 'Display LON-CAPA page header',
+ 'inlinemenu'=> 'Display LON-CAPA inline menu',
);
return %lt;
}
@@ -4709,6 +4738,7 @@ sub lti_options {
$checked{'crssec'} = {};
$checked{'crssecsrc'} = {};
$checked{'lcauth'} = {};
+ $checked{'menuitem'} = {};
if ($num eq 'add') {
$checked{'lcauth'}{'lti'} = ' checked="checked"';
}
@@ -4719,7 +4749,9 @@ sub lti_options {
my $lcauthparm;
my $lcauthparmstyle = 'display:none';
my $lcauthparmtext;
+ my $menusty;
my $numinrow = 4;
+ my %menutitles = <imenu_titles();
if (ref($current) eq 'HASH') {
if (($current->{'mapuser'} ne '') && ($current->{'mapuser'} ne 'lis_person_sourcedid')) {
@@ -4749,7 +4781,7 @@ sub lti_options {
}
if ($current->{'makecrs'}) {
$checked{'makecrs'}{'Y'} = ' checked="checked"';
- }
+ }
if (ref($current->{'makeuser'}) eq 'ARRAY') {
foreach my $role (@{$current->{'makeuser'}}) {
$checked{'makeuser'}{$role} = ' checked="checked"';
@@ -4788,10 +4820,35 @@ sub lti_options {
} else {
$checked{'crssec'}{'N'} = ' checked="checked"';
}
+ if ($current->{'topmenu'}) {
+ $checked{'topmenu'}{'Y'} = ' checked="checked"';
+ } else {
+ $checked{'topmenu'}{'N'} = ' checked="checked"';
+ }
+ if ($current->{'inlinemenu'}) {
+ $checked{'inlinemenu'}{'Y'} = ' checked="checked"';
+ } else {
+ $checked{'inlinemenu'}{'N'} = ' checked="checked"';
+ }
+ if (($current->{'topmenu'}) || ($current->{'inlinemenu'})) {
+ $menusty = 'inline-block';
+ if (ref($current->{'lcmenu'}) eq 'ARRAY') {
+ foreach my $item (@{$current->{'lcmenu'}}) {
+ if (exists($menutitles{$item})) {
+ $checked{'menuitem'}{$item} = ' checked="checked"';
+ }
+ }
+ }
+ } else {
+ $menusty = 'none';
+ }
} else {
$checked{'makecrs'}{'N'} = ' checked="checked"';
$checked{'crssec'}{'N'} = ' checked="checked"';
-#FIXME
+ $checked{'topmenu'}{'N'} = ' checked="checked"';
+ $checked{'inlinemenu'}{'Y'} = ' checked="checked"';
+ $checked{'menuitem'}{'grades'} = ' checked="checked"';
+ $menusty = 'inline-block';
}
my @coursetypes = ('official','unofficial','community','textbook','placement','lti');
my %coursetypetitles = &Apache::lonlocal::texthash (
@@ -4818,6 +4875,7 @@ sub lti_options {
my $onclicksec = ' onclick="toggleLTI(this.form,'."'sec','$num'".');"';
my $onclicksecsrc = ' onclick="toggleLTI(this.form,'."'secsrc','$num'".')"';
my $onclicklcauth = ' onclick="toggleLTI(this.form,'."'lcauth','$num'".')"';
+ my $onclickmenu = ' onclick="toggleLTI(this.form,'."'lcmenu','$num'".');"';
my $output = '