[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
raeburn
raeburn at source.lon-capa.org
Sat Apr 30 15:29:43 EDT 2022
raeburn Sat Apr 30 19:29:43 2022 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- Edit Resource Parameters - Overview Mode
Eliminate javascript error from "Parameter Level" drop-down list,
after form submitted with "Parameter Level" set to "Course Level".
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.609 loncom/interface/lonparmset.pm:1.610
--- loncom/interface/lonparmset.pm:1.609 Sat Apr 30 03:11:05 2022
+++ loncom/interface/lonparmset.pm Sat Apr 30 19:29:43 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.609 2022/04/30 03:11:05 raeburn Exp $
+# $Id: lonparmset.pm,v 1.610 2022/04/30 19:29:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2743,8 +2743,9 @@
# @param {string} $pschp - selected map pc, or 'all'
# @param {hash reference} $maptitles - hash map id or src -> map title
# @param {hash reference} $symbp - hash map pc or resource/map id -> map src.'___(all)' or resource symb
+# @param {string} $parmlev - parameter level (Resource:'full', Map:'map', Course:'general')
sub mapmenu {
- my ($r,$allmaps,$pschp,$maptitles,$symbp)=@_;
+ my ($r,$allmaps,$pschp,$maptitles,$symbp,$parmlev)=@_;
my %allmaps_inverted = reverse %$allmaps;
my $navmap = Apache::lonnavmaps::navmap->new();
my $tree=[];
@@ -2792,7 +2793,11 @@
}
}
# Show it ...
- $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'),'','',' id="mapmenu"'));
+ my $rowattr = ' id="mapmenu"';
+ if ($parmlev eq 'general') {
+ $rowattr .= ' style="display:none"';
+ }
+ $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'),'','',$rowattr));
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) {
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />';
my $whitespace =
@@ -3650,7 +3655,7 @@
$r->print(&Apache::lonhtmlcommon::start_pick_box(undef,'parmlevel'));
&levelmenu($r,\%alllevs,$parmlev);
$r->print(&Apache::lonhtmlcommon::row_closure());
- &mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp);
+ &mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp,$parmlev);
$r->print(&Apache::lonhtmlcommon::row_closure());
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')));
&partmenu($r,\%allparts,\@psprt);
@@ -6005,10 +6010,8 @@
$r->print('<div>');
$r->print(&Apache::lonhtmlcommon::start_pick_box(undef,'parmlevel'));
&levelmenu($r,\%alllevs,$parmlev);
- if ($parmlev ne 'general') {
- $r->print(&Apache::lonhtmlcommon::row_closure());
- &mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp);
- }
+ $r->print(&Apache::lonhtmlcommon::row_closure());
+ &mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp,$parmlev);
$r->print(&Apache::lonhtmlcommon::row_closure(1));
$r->print(&Apache::lonhtmlcommon::end_pick_box());
$r->print('</div></div>');
More information about the LON-CAPA-cvs
mailing list