version 1.481, 2009/11/14 16:07:16
|
version 1.486, 2009/11/22 21:07:41
|
Line 903 sub startpage {
|
Line 903 sub startpage {
|
my ($r) = @_; |
my ($r) = @_; |
|
|
my %loaditems = ('onunload' => "pclose()", |
my %loaditems = ('onunload' => "pclose()", |
'onload' => "group_or_section('cgroup')", |
'onload' => "showHide_courseContent(); group_or_section('cgroup')", |
'onload' => "showHide_courseContent()", |
|
); |
); |
|
|
if ((($env{'form.command'} eq 'set') && ($env{'form.url'}) |
if ((($env{'form.command'} eq 'set') && ($env{'form.url'}) |
Line 1768 sub mapmenu {
|
Line 1767 sub mapmenu {
|
} |
} |
} |
} |
# Show it ... |
# Show it ... |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'),'','',' id="mapmenu"')); |
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) { |
if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) { |
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />'; |
my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />'; |
$r->print(&Apache::loncommon::start_data_table() |
$r->print(&Apache::loncommon::start_data_table() |
Line 1835 sub mapmenu {
|
Line 1834 sub mapmenu {
|
} |
} |
} |
} |
|
|
|
# Build up the select Box to choose if your parameter specification should work for the resource, map/folder or the course level |
|
# The value of default selection in the select box is set by the value that is given by the argument in $parmlev. |
sub levelmenu { |
sub levelmenu { |
my ($r,$alllevs,$parmlev)=@_; |
my ($r,$alllevs,$parmlev)=@_; |
|
|
Line 2186 function parmsel_show() {
|
Line 2187 function parmsel_show() {
|
// ]]> |
// ]]> |
</script> |
</script> |
ENDPARMSELSCRIPT |
ENDPARMSELSCRIPT |
my $parmselhiddenstyle=' style="display:none"'; |
|
if($env{'form.hideparmsel'} eq 'hidden') { |
|
$r->print('<div id="parmsel"'.$parmselhiddenstyle.'>'); |
|
} else { |
|
$r->print('<div id="parmsel">'); |
|
} |
|
|
|
|
|
# Display Unit 1 "General Parameters" |
# Display Unit 1 "General Parameters" |
if (!$pssymb) { |
if (!$pssymb) { |
|
my $parmselhiddenstyle=' style="display:none"'; |
|
if($env{'form.hideparmsel'} eq 'hidden') { |
|
$r->print('<div id="parmsel"'.$parmselhiddenstyle.'>'); |
|
} else { |
|
$r->print('<div id="parmsel">'); |
|
} |
|
|
$r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification'))); |
$r->print(<<COURSECONTENTSCRIPT); |
$r->print(<<COURSECONTENTSCRIPT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 2220 COURSECONTENTSCRIPT
|
Line 2221 COURSECONTENTSCRIPT
|
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print('<div id="mapmenu">'); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print('</div>'); |
|
#Display Unit 2 "Select Parameter" |
#Display Unit 2 "Select Parameter" |
$r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification'))); |
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)'))); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
|
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('<p>' |
|
.'<input type="submit" name="dis"' |
|
.' value="'.&mt('Update Parameter Display').'" />' |
|
.'<input type="hidden" name="hideparmsel" value="hidden" />' |
|
.'</p>'); |
|
$r->print('</div>'); |
|
# Offer link to display parameter selection again |
|
$r->print('<p id="parmsellink"'); |
|
if ($env{'form.hideparmsel'} ne 'hidden') { |
|
$r->print($parmselhiddenstyle); |
|
} |
|
$r->print('>' |
|
.'<a href="javascript:parmsel_show()">' |
|
.&mt('Change Parameter Selection') |
|
.'</a>' |
|
.'</p>'); |
} else { |
} else { |
# parameter screen for a single resource. |
# parameter screen for a single resource. |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my $title = &Apache::lonnet::gettitle($pssymb); |
my $title = &Apache::lonnet::gettitle($pssymb); |
$r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource). |
$r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource). |
'<input type="hidden" value="'.$pssymb.'" name="symb" />'. |
'<input type="hidden" value="'.$pssymb.'" name="symb" />'. |
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
'<br />'); |
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />'); |
$r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('User Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
} |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')). |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
'<label>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
($env{'form.psprt'}?' checked="checked"':'').' /></label></td></tr>'); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
# parm selection is shown: display parm update button |
$r->print('<p>' |
$r->print('<p>' |
|
.'<input type="submit" name="dis"' |
.'<input type="submit" name="dis"' |
.' value="'.&mt('Update Parameter Display').'" />' |
.' value="'.&mt('Update Parameter Display').'" />' |
.'<input type="hidden" name="hideparmsel" value="hidden" />' |
.'<input type="hidden" name="hideparmsel" value="hidden" />' |
.'</p>' |
.'</p>'); |
); |
|
|
|
$r->print('</div>'); |
|
# ----- End Parameter Selection |
|
|
|
# Offer link to display parameter selection again |
|
$r->print('<p id="parmsellink"'); |
|
if($env{'form.hideparmsel'} ne 'hidden') { |
|
$r->print($parmselhiddenstyle); |
|
} |
} |
$r->print('>' |
|
.'<a href="javascript:parmsel_show()">' |
|
.&mt('Change Parameter Selection') |
|
.'</a>' |
|
.'</p>' |
|
); |
|
|
|
|
# ----- End Parameter Selection |
|
|
# Display Messages |
# Display Messages |
$r->print('<div>'.$message.'</div>'); |
$r->print('<div>'.$message.'</div>'); |
Line 3188 ENDOVER
|
Line 3192 ENDOVER
|
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
#$r->print('<td class="LC_parm_overview_map_menu">'); |
#$r->print('<td class="LC_parm_overview_map_menu">'); |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
$r->print(&Apache::lonhtmlcommon::row_closure()); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp); |
#$r->print('</td>'); |
#$r->print('</td>'); |
} |
} |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |