version 1.474, 2009/10/23 18:49:10
|
version 1.492, 2010/01/30 17:35:10
|
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 1161 sub extractResourceInformation {
|
Line 1160 sub extractResourceInformation {
|
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my @allres=$navmap->retrieveResources(undef,undef,1,undef,1); |
my @allres=$navmap->retrieveResources(undef,undef,1,undef,1); |
foreach my $resource (@allres) { |
foreach my $resource (@allres) { |
my $id=$resource->id(); |
my $id=$resource->id(); |
my ($mapid,$resid)=split(/\./,$id); |
my ($mapid,$resid)=split(/\./,$id); |
if ($mapid eq '0') { next; } |
if ($mapid eq '0') { next; } |
$$ids[$#$ids+1]=$id; |
$$ids[$#$ids+1]=$id; |
my $srcf=$resource->src(); |
my $srcf=$resource->src(); |
$srcf=~/\.(\w+)$/; |
$srcf=~/\.(\w+)$/; |
$$typep{$id}=$1; |
$$typep{$id}=$1; |
$$keyp{$id}=''; |
$$keyp{$id}=''; |
$$uris{$id}=$srcf; |
$$uris{$id}=$srcf; |
foreach my $key (split(/\,/,&Apache::lonnet::metadata($srcf,'allpossiblekeys'))) { |
foreach my $key (split(/\,/,&Apache::lonnet::metadata($srcf,'allpossiblekeys'))) { |
next if ($key!~/^parameter_/); |
next if ($key!~/^parameter_/); |
|
|
# Hidden parameters |
# Hidden parameters |
next if (&Apache::lonnet::metadata($srcf,$key.'.hidden') eq 'parm'); |
next if (&Apache::lonnet::metadata($srcf,$key.'.hidden') eq 'parm'); |
# |
# |
# allparms is a hash of parameter names |
# allparms is a hash of parameter names |
# |
# |
my $name=&Apache::lonnet::metadata($srcf,$key.'.name'); |
my $name=&Apache::lonnet::metadata($srcf,$key.'.name'); |
if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) { |
if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) { |
my ($display,$parmdis); |
my ($display,$parmdis); |
$display = &standard_parameter_names($name); |
$display = &standard_parameter_names($name); |
if ($display eq '') { |
if ($display eq '') { |
$display= &Apache::lonnet::metadata($srcf,$key.'.display'); |
$display= &Apache::lonnet::metadata($srcf,$key.'.display'); |
$parmdis = $display; |
$parmdis = $display; |
$parmdis =~ s/\s*\[Part.*$//g; |
$parmdis =~ s/\s*\[Part.*$//g; |
} else { |
} else { |
$parmdis = &mt($display); |
$parmdis = &mt($display); |
} |
} |
$$allparms{$name}=$parmdis; |
$$allparms{$name}=$parmdis; |
if (ref($defkeytype)) { |
if (ref($defkeytype)) { |
$$defkeytype{$name}= |
$$defkeytype{$name}= |
&Apache::lonnet::metadata($srcf,$key.'.type'); |
&Apache::lonnet::metadata($srcf,$key.'.type'); |
} |
} |
} |
} |
|
|
# |
# |
# allparts is a hash of all parts |
# allparts is a hash of all parts |
# |
# |
my $part= &Apache::lonnet::metadata($srcf,$key.'.part'); |
my $part= &Apache::lonnet::metadata($srcf,$key.'.part'); |
$$allparts{$part} = &mt('Part: [_1]',$part); |
$$allparts{$part} = &mt('Part: [_1]',$part); |
# |
# |
# Remember all keys going with this resource |
# Remember all keys going with this resource |
# |
# |
if ($$keyp{$id}) { |
if ($$keyp{$id}) { |
$$keyp{$id}.=','.$key; |
$$keyp{$id}.=','.$key; |
} else { |
} else { |
$$keyp{$id}=$key; |
$$keyp{$id}=$key; |
} |
} |
# |
# |
# Put in order |
# Put in order |
# |
# |
unless ($$keyorder{$key}) { |
unless ($$keyorder{$key}) { |
$$keyorder{$key}=$keyordercnt; |
$$keyorder{$key}=$keyordercnt; |
$keyordercnt++; |
$keyordercnt++; |
|
} |
} |
} |
} |
|
|
|
|
|
if (!exists($$mapp{$mapid})) { |
if (!exists($$mapp{$mapid})) { |
$$mapp{$id}= |
$$mapp{$id}= |
&Apache::lonnet::declutter($resource->enclosing_map_src()); |
&Apache::lonnet::declutter($resource->enclosing_map_src()); |
$$mapp{$mapid}=$$mapp{$id}; |
$$mapp{$mapid}=$$mapp{$id}; |
$$allmaps{$mapid}=$$mapp{$id}; |
$$allmaps{$mapid}=$$mapp{$id}; |
if ($mapid eq '1') { |
if ($mapid eq '1') { |
$$maptitles{$mapid}=&mt('Main Course Documents'); |
$$maptitles{$mapid}=&mt('Main Course Documents'); |
|
} else { |
|
$$maptitles{$mapid}=&Apache::lonnet::gettitle($$mapp{$id}); |
|
} |
|
$$maptitles{$$mapp{$id}}=$$maptitles{$mapid}; |
|
$$symbp{$mapid}=$$mapp{$id}.'___(all)'; |
} else { |
} else { |
$$maptitles{$mapid}= |
$$mapp{$id} = $$mapp{$mapid}; |
&Apache::lonnet::gettitle($$mapp{$id}); |
|
} |
} |
$$maptitles{$$mapp{$id}}=$$maptitles{$mapid}; |
$$symbp{$id}=&Apache::lonnet::encode_symb($$mapp{$id},$resid,$srcf); |
$$symbp{$mapid}=$$mapp{$id}.'___(all)'; |
|
} else { |
|
$$mapp{$id} = $$mapp{$mapid}; |
|
} |
|
$$symbp{$id}=&Apache::lonnet::encode_symb($$mapp{$id},$resid,$srcf); |
|
} |
} |
} |
} |
|
|
Line 1363 ENDSCRIPT
|
Line 1361 ENDSCRIPT
|
.'</li>' |
.'</li>' |
); |
); |
} |
} |
$r->print('</ul>' |
$r->print('</ul>'); |
.'<p><a href="javascript:showParms()">' |
|
.&mt('Show detailed Parameter Selection') |
|
.'</a></p>' |
|
); |
|
|
|
|
$r->print('<hr />'); |
&shortCuts($r,$allparms,$pscat,$keyorder); |
&shortCuts($r,$allparms,$pscat,$keyorder); |
|
$r->print('<hr />'); |
|
|
|
$r->print( |
|
'<p><a href="javascript:showParms()">' |
|
.&mt('Show detailed Parameter Selection') |
|
.'</a></p>' |
|
); |
|
|
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
} |
} |
Line 1495 sub parmboxes {
|
Line 1497 sub parmboxes {
|
'slots' => [], |
'slots' => [], |
'file_submission' => [], |
'file_submission' => [], |
'misc' => [], |
'misc' => [], |
); |
); |
|
my $hidelink = |
|
'<p>' |
|
.'<a href="javascript:hideParms()">' |
|
.&mt('Hide detailed Parameter Selection') |
|
.'</a>' |
|
.'</p>' |
|
."\n"; |
|
; |
foreach $tempparameter (keys %$allparms) { |
foreach $tempparameter (keys %$allparms) { |
&whatIsMyCategory($tempparameter, \%categoryList); |
&whatIsMyCategory($tempparameter, \%categoryList); |
} |
} |
#part to print the parm-list |
#part to print the parm-list |
$r->print('<fieldset id="LC_parm_overview_parm_menu" style="display:none">' |
$r->print( |
.'<legend>'.&mt('Parameter').'</legend>'."\n" |
'<div id="LC_parm_overview_parm_menu" class="LC_Box" style="display:none">'."\n" |
|
.'<h3>'.&mt('Parameter').'</h3>'."\n" |
|
.$hidelink |
|
.'<div class="LC_columnSection">'."\n" |
); |
); |
|
|
#Print parameters |
#Print parameters |
Line 1509 sub parmboxes {
|
Line 1522 sub parmboxes {
|
if(@{$categoryList{$key}} == 0) { |
if(@{$categoryList{$key}} == 0) { |
next; |
next; |
} else { |
} else { |
$r->print('<fieldset>' |
$r->print('<div class="LC_Box LC_400Box">' |
.'<legend>' |
.'<h4 class="LC_hcell">' |
.&mt($categories{$key}) |
.&mt($categories{$key}) |
.'</legend>'."\n"); |
.'</h4>'."\n"); |
foreach $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) { |
foreach $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) { |
$r->print('<span class="LC_nobreak">' |
$r->print('<span class="LC_nobreak">' |
.'<label><input type="checkbox" name="pscat" '); |
.'<label><input type="checkbox" name="pscat" '); |
Line 1523 sub parmboxes {
|
Line 1536 sub parmboxes {
|
} |
} |
$r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} |
$r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} |
: $tempkey) |
: $tempkey) |
.'</label></span> '); |
.'</label></span><br />'."\n"); |
} |
} |
$r->print('</fieldset>'); |
$r->print("</div>\n"); |
} |
} |
} |
} |
$r->print('<hr />' |
|
.'<a href="javascript:hideParms()">' |
|
.&mt('Hide') |
|
.'</a>' |
|
); |
|
|
|
#&shortCuts($r,$allparms,$pscat,$keyorder); |
#&shortCuts($r,$allparms,$pscat,$keyorder); |
$r->print('</fieldset>'); |
$r->print( |
|
"</div>\n" |
|
.$hidelink |
|
."</div>\n" |
|
); |
} |
} |
# |
# |
# This function offers some links on the parameter section to get with one click a group a parameters |
# This function offers some links on the parameter section to get with one click a group a parameters |
Line 1543 sub parmboxes {
|
Line 1555 sub parmboxes {
|
sub shortCuts { |
sub shortCuts { |
my ($r,$allparms,$pscat,$keyorder)=@_; |
my ($r,$allparms,$pscat,$keyorder)=@_; |
|
|
#part to print out the shortcuts for parmselection |
# Parameter Selection |
$r->print('<table><tr id="LC_parm_overview_parm_menu_selectors">' |
$r->print( |
.'<td valign="top">' |
&Apache::lonhtmlcommon::start_funclist(&mt('Parameter Selection')) |
.'<fieldset><legend>'.&mt('Parameter Selection').'</legend>' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'<span class="LC_nobreak">' |
'<a href="javascript:checkall(true, \'pscat\')">'.&mt('Select All').'</a>') |
.'• <a href="javascript:checkall(true, \'pscat\')">'.&mt('Select All').'</a>' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'</span>' |
'<a href="javascript:checkstandard()">'.&mt('Select Common Only').'</a>') |
.'<br />' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'<span class="LC_nobreak">' |
'<a href="javascript:checkall(false, \'pscat\')">'.&mt('Unselect All').'</a>') |
.'• <a href="javascript:checkstandard()">'.&mt('Select Common Only').'</a>' |
.&Apache::lonhtmlcommon::end_funclist() |
.'</span>' |
); |
.'<br />' |
|
.'<span class="LC_nobreak">' |
# Add Selection for... |
.'• <a href="javascript:checkall(false, \'pscat\')">'.&mt('Unselect All').'</a>' |
$r->print( |
.'</span>' |
&Apache::lonhtmlcommon::start_funclist(&mt('Add Selection for...')) |
.'</fieldset>' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'</td>' |
'<a href="javascript:checkdates()">'.&mt('Problem Dates').'</a>') |
.'<td colspan="2" valign="top">' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'<fieldset><legend>'.&mt('Add Selection for...').'</legend>' |
'<a href="javascript:checkcontdates()">'.&mt('Content Dates').'</a>') |
.'<span class="LC_nobreak">' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'• <a href="javascript:checkdates()">'.&mt('Problem Dates').'</a>' |
'<a href="javascript:checkdisset()">'.&mt('Discussion Settings').'</a>') |
.'</span>' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'<span class="LC_nobreak">' |
'<a href="javascript:checkvisi()">'.&mt('Visibilities').'</a>') |
.' • <a href="javascript:checkcontdates()">'.&mt('Content Dates').'</a>' |
.&Apache::lonhtmlcommon::add_item_funclist( |
.'</span>' |
'<a href="javascript:checkparts()">'.&mt('Part Parameters').'</a>') |
# .'<br />' |
.&Apache::lonhtmlcommon::end_funclist() |
.'<span class="LC_nobreak">' |
); |
.' • <a href="javascript:checkdisset()">'.&mt('Discussion Settings').'</a>' |
|
.'</span>' |
|
.'<span class="LC_nobreak">' |
|
.' • <a href="javascript:checkvisi()">'.&mt('Visibilities').'</a>' |
|
.'</span>' |
|
# .'<br />' |
|
.'<span class="LC_nobreak">' |
|
.' • <a href="javascript:checkparts()">'.&mt('Part Parameters').'</a>' |
|
.'</span>' |
|
.'</fieldset>' |
|
.'</td>' |
|
.'</tr></table>'); |
|
} |
} |
|
|
sub partmenu { |
sub partmenu { |
Line 1709 function group_or_section(caller) {
|
Line 1709 function group_or_section(caller) {
|
# |
# |
sub displaymenu { |
sub displaymenu { |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
$r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Select Parameters'))); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
&parmboxes($r,$allparms,$pscat,$keyorder); |
&parmboxes($r,$allparms,$pscat,$keyorder); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
|
&partmenu($r,$allparts,$psprt); |
|
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
} |
} |
|
|
sub mapmenu { |
sub mapmenu { |
Line 1770 sub mapmenu {
|
Line 1764 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 1837 sub mapmenu {
|
Line 1831 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 2188 function parmsel_show() {
|
Line 2184 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" |
|
if (!$pssymb) { |
if (!$pssymb) { |
$r->print(&Apache::lonhtmlcommon::topic_bar (1,&mt('General Parameters'))); |
my $parmselhiddenstyle=' style="display:none"'; |
|
if($env{'form.hideparmsel'} eq 'hidden') { |
|
$r->print('<div id="parmsel"'.$parmselhiddenstyle.'>'); |
|
} else { |
|
$r->print('<div id="parmsel">'); |
|
} |
|
|
|
# Step 1 |
|
$r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification'))); |
$r->print(<<COURSECONTENTSCRIPT); |
$r->print(<<COURSECONTENTSCRIPT); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
Line 2220 COURSECONTENTSCRIPT
|
Line 2216 COURSECONTENTSCRIPT
|
|
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
|
$r->print(&Apache::lonhtmlcommon::row_closure()); |
|
&mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp); |
|
$r->print(&Apache::lonhtmlcommon::row_closure()); |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
|
&partmenu($r,\%allparts,\@psprt); |
$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">'); |
|
|
# Step 2 |
|
$r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification'))); |
|
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
|
|
|
# Step 3 |
|
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp); |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
$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()); |
|
|
|
# Update Display Button |
|
$r->print('<p>' |
|
.'<input type="submit" name="dis"' |
|
.' value="'.&mt('Update Parameter Display').'" />' |
|
.'<input type="hidden" name="hideparmsel" value="hidden" />' |
|
.'</p>'); |
$r->print('</div>'); |
$r->print('</div>'); |
#Display Unit 2 "Select Parameter" |
|
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
# 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 { |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
# parameter screen for a single resource. |
|
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::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::topic_bar (3,&mt('User Selection'))); |
$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()">' |
# ----- End Parameter Selection |
.&mt('Change Parameter Selection') |
|
.'</a>' |
|
.'</p>' |
|
); |
|
|
|
# Display Messages |
# Display Messages |
$r->print('<div>'.$message.'</div>'); |
$r->print('<div>'.$message.'</div>'); |
Line 3172 ENDOVER
|
Line 3182 ENDOVER
|
\%keyorder,\%defkeytype); |
\%keyorder,\%defkeytype); |
|
|
if (grep {$_ eq 'all'} (@psprt)) { |
if (grep {$_ eq 'all'} (@psprt)) { |
@psprt = keys(%allparts); |
@psprt = keys(%allparts); |
} |
} |
# Menu to select levels, etc |
# Menu to select levels, etc |
|
|
#$r->print('<table id="LC_parm_overview_scope"> |
|
# <tr><td class="LC_parm_overview_level_menu">'); |
|
$r->print('<div class="LC_Box">'); |
$r->print('<div class="LC_Box">'); |
#$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
#$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
$r->print('<div>'); |
$r->print('<div>'); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
#$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(&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></div>'); |
$r->print('</div></div>'); |
#$r->print('</td></tr></table>'); |
|
|
|
#$r->print('<table id="LC_parm_overview_controls"> |
|
# <tr><td class="LC_parm_overview_parm_selectors">'); |
|
$r->print('<div class="LC_Box">'); |
$r->print('<div class="LC_Box">'); |
$r->print('<div>'); |
$r->print('<div>'); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
Line 3204 ENDOVER
|
Line 3207 ENDOVER
|
&parmboxes($r,\%allparms,\@pscat,\%keyorder); |
&parmboxes($r,\%allparms,\@pscat,\%keyorder); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
#$r->print('</td><td class="LC_parm_overview_restrictions">'. |
$r->print('<table>'. |
$r->print('<table>'. |
|
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
&partmenu($r,\%allparts,\@psprt); |
&partmenu($r,\%allparts,\@psprt); |
Line 3240 ENDOVER
|
Line 3242 ENDOVER
|
|
|
if (($env{'form.store'}) || ($env{'form.dis'})) { |
if (($env{'form.store'}) || ($env{'form.dis'})) { |
|
|
if ($env{'form.store'}) { &storedata($r,$crs,$dom); } |
if ($env{'form.store'}) { &storedata($r,$crs,$dom); } |
|
|
# Read modified data |
# Read modified data |
|
|
my $resourcedata=&readdata($crs,$dom); |
my $resourcedata=&readdata($crs,$dom); |
|
|
# List data |
# List data |
|
|
&listdata($r,$resourcedata,$listdata,$sortorder); |
&listdata($r,$resourcedata,$listdata,$sortorder); |
} |
} |
$r->print(&tableend(). |
$r->print(&tableend(). |
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':''). |
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':''). |
Line 3639 ENDMAINFORMHEAD
|
Line 3641 ENDMAINFORMHEAD
|
my $vgr = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
my $vgr = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
my $mgr = &Apache::lonnet::allowed('mgr',$env{'request.course.id'}); |
my $mgr = &Apache::lonnet::allowed('mgr',$env{'request.course.id'}); |
|
|
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $lc_crstype = lc($crstype); |
|
|
my @menu = |
my @menu = |
( { categorytitle=>'Settings for this Course', |
( { categorytitle=>"Settings for this $crstype", |
items => [ |
items => [ |
{ linktext => 'Course Configuration', |
{ linktext => "$crstype Configuration", |
url => '/adm/courseprefs?origin=params', |
url => '/adm/courseprefs?origin=params', |
permission => $parm_permission, |
permission => $parm_permission, |
linktitle =>'Edit course configuration.' , |
linktitle => "Edit $lc_crstype configuration." , |
icon => 'preferences-desktop-remote-desktop.png' , |
icon => 'preferences-desktop-remote-desktop.png' , |
#help => 'Course_Environment', |
#help => 'Course_Environment', |
}, |
}, |
{ linktext => 'Portfolio Metadata', |
{ linktext => 'Portfolio Metadata', |
url => '/adm/parmset?action=setrestrictmeta', |
url => '/adm/parmset?action=setrestrictmeta', |
permission => $parm_permission, |
permission => $parm_permission, |
linktitle => 'Restrict metadata for this course.' , |
linktitle => "Restrict metadata for this $lc_crstype." , |
icon =>'contact-new.png' , |
icon =>'contact-new.png' , |
}, |
}, |
{ linktext => 'Manage Course Slots', |
{ linktext => "Manage $crstype Slots", |
url => '/adm/slotrequest?command=showslots', |
url => '/adm/slotrequest?command=showslots', |
permission => $vgr, |
permission => $vgr, |
linktitle =>'Manage slots for this course.' , |
linktitle => "Manage slots for this $lc_crstype." , |
icon => 'format-justify-fill.png' , |
icon => 'rsrv.png' , |
}, |
}, |
{ linktext => 'Reset Student Access Times', |
{ linktext => 'Reset Student Access Times', |
url => '/adm/helper/resettimes.helper', |
url => '/adm/helper/resettimes.helper', |
permission => $mgr, |
permission => $mgr, |
linktitle =>'Reset access times for folders/maps, resources or the course.' , |
linktitle => "Reset access times for folders/maps, resources or the $lc_crstype." , |
icon => 'start-here.png' , |
icon => 'start-here.png' , |
}, |
}, |
|
|
Line 3710 ENDMAINFORMHEAD
|
Line 3714 ENDMAINFORMHEAD
|
{ linktext => 'Change Log', |
{ linktext => 'Change Log', |
url => '/adm/parmset?action=parameterchangelog', |
url => '/adm/parmset?action=parameterchangelog', |
permission => $parm_permission, |
permission => $parm_permission, |
linktitle =>'View parameter and course blog posting/user notification change log.' , |
linktitle =>"View parameter and $lc_crstype blog posting/user notification change log." , |
icon => 'emblem-system.png' , |
icon => 'document-properties.png', |
}]} |
}]} |
); |
); |
$r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); |
$r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); |
Line 4621 sub handler {
|
Line 4625 sub handler {
|
&date_shift_one($r); |
&date_shift_one($r); |
} elsif ($env{'form.action'} eq 'dateshift2') { |
} elsif ($env{'form.action'} eq 'dateshift2') { |
&date_shift_two($r); |
&date_shift_two($r); |
} elsif ($env{'form.action'} eq 'categorizecourse') { |
|
&assign_course_categories($r); |
|
} |
} |
} else { |
} else { |
# ----------------------------- Not in a course, or not allowed to modify parms |
# ----------------------------- Not in a course, or not allowed to modify parms |