--- loncom/interface/lonparmset.pm 2009/11/08 19:51:22 1.480 +++ loncom/interface/lonparmset.pm 2010/01/12 18:11:58 1.491 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.480 2009/11/08 19:51:22 amueller Exp $ +# $Id: lonparmset.pm,v 1.491 2010/01/12 18:11:58 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -903,8 +903,7 @@ sub startpage { my ($r) = @_; my %loaditems = ('onunload' => "pclose()", - 'onload' => "group_or_section('cgroup')", - 'onload' => "showHide_courseContent()", + 'onload' => "showHide_courseContent(); group_or_section('cgroup')", ); if ((($env{'form.command'} eq 'set') && ($env{'form.url'}) @@ -1362,13 +1361,17 @@ ENDSCRIPT .'' ); } - $r->print('' - .'

' - .&mt('Show detailed Parameter Selection') - .'

' - ); + $r->print(''); + $r->print('
'); &shortCuts($r,$allparms,$pscat,$keyorder); + $r->print('
'); + + $r->print( + '

' + .&mt('Show detailed Parameter Selection') + .'

' + ); $r->print(&Apache::lonhtmlcommon::row_closure(1)); } @@ -1494,13 +1497,24 @@ sub parmboxes { 'slots' => [], 'file_submission' => [], 'misc' => [], - ); + ); + my $hidelink = + '

' + .'' + .&mt('Hide detailed Parameter Selection') + .'' + .'

' + ."\n"; +; foreach $tempparameter (keys %$allparms) { &whatIsMyCategory($tempparameter, \%categoryList); } #part to print the parm-list - $r->print(''); + $r->print( + "\n" + .$hidelink + ."\n" + ); } # # This function offers some links on the parameter section to get with one click a group a parameters @@ -1542,45 +1555,33 @@ sub parmboxes { sub shortCuts { my ($r,$allparms,$pscat,$keyorder)=@_; - #part to print out the shortcuts for parmselection - $r->print('' - .'' - .'' - .'
' - .'
'.&mt('Parameter Selection').'' - .'' - .'• '.&mt('Select All').'' - .'' - .'
' - .'' - .'• '.&mt('Select Common Only').'' - .'' - .'
' - .'' - .'• '.&mt('Unselect All').'' - .'' - .'
' - .'
' - .'
'.&mt('Add Selection for...').'' - .'' - .'• '.&mt('Problem Dates').'' - .'' - .'' - .' • '.&mt('Content Dates').'' - .'' -# .'
' - .'' - .' • '.&mt('Discussion Settings').'' - .'' - .'' - .' • '.&mt('Visibilities').'' - .'' -# .'
' - .'' - .' • '.&mt('Part Parameters').'' - .'' - .'
' - .'
'); + # Parameter Selection + $r->print( + &Apache::lonhtmlcommon::start_funclist(&mt('Parameter Selection')) + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Select All').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Select Common Only').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Unselect All').'') + .&Apache::lonhtmlcommon::end_funclist() + ); + + # Add Selection for... + $r->print( + &Apache::lonhtmlcommon::start_funclist(&mt('Add Selection for...')) + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Problem Dates').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Content Dates').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Discussion Settings').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Visibilities').'') + .&Apache::lonhtmlcommon::add_item_funclist( + ''.&mt('Part Parameters').'') + .&Apache::lonhtmlcommon::end_funclist() + ); } sub partmenu { @@ -1712,11 +1713,6 @@ sub displaymenu { &parmmenu($r,$allparms,$pscat,$keyorder); $r->print(&Apache::lonhtmlcommon::end_pick_box()); &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 { @@ -1768,7 +1764,7 @@ sub mapmenu { } } # 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')) { my $icon = ''; $r->print(&Apache::loncommon::start_data_table() @@ -1835,6 +1831,8 @@ 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 { my ($r,$alllevs,$parmlev)=@_; @@ -2186,16 +2184,16 @@ function parmsel_show() { // ]]> ENDPARMSELSCRIPT - my $parmselhiddenstyle=' style="display:none"'; - if($env{'form.hideparmsel'} eq 'hidden') { - $r->print('
'); - } else { - $r->print('
'); - } - - # Display Unit 1 "General Parameters" if (!$pssymb) { + my $parmselhiddenstyle=' style="display:none"'; + if($env{'form.hideparmsel'} eq 'hidden') { + $r->print('
'); + } else { + $r->print('
'); + } + + # Step 1 $r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification'))); $r->print(< @@ -2218,56 +2216,66 @@ COURSECONTENTSCRIPT $r->print(&Apache::lonhtmlcommon::start_pick_box()); &levelmenu($r,\%alllevs,$parmlev); - $r->print(&Apache::lonhtmlcommon::row_closure(1)); - $r->print(&Apache::lonhtmlcommon::end_pick_box()); - $r->print('
'); - $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $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::end_pick_box()); - $r->print('
'); - #Display Unit 2 "Select Parameter" + + # 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()); + &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); + $r->print(&Apache::lonhtmlcommon::row_closure(1)); + $r->print(&Apache::lonhtmlcommon::end_pick_box()); + + # Update Display Button + $r->print('

' + .'' + .'' + .'

'); + $r->print('
'); + + # Offer link to display parameter selection again + $r->print(''); } else { # 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); $r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource). ''. - '

'); - $r->print(&Apache::lonhtmlcommon::topic_bar('',&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()); - - # parm selection is shown: display parm update button - $r->print('

' + '
'); + $r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)'))); + $r->print(&Apache::lonhtmlcommon::start_pick_box()); + $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')). + ''); + &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('

' .'' .'' - .'

' - ); - - $r->print('
'); - # ----- End Parameter Selection - - # Offer link to display parameter selection again - $r->print(''); } - $r->print('>' - .'' - .&mt('Change Parameter Selection') - .'' - .'

' - ); + # ----- End Parameter Selection # Display Messages $r->print('
'.$message.'
'); @@ -3174,30 +3182,23 @@ ENDOVER \%keyorder,\%defkeytype); if (grep {$_ eq 'all'} (@psprt)) { - @psprt = keys(%allparts); + @psprt = keys(%allparts); } # Menu to select levels, etc - #$r->print(' - # '); + &mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp); } $r->print(&Apache::lonhtmlcommon::row_closure(1)); $r->print(&Apache::lonhtmlcommon::end_pick_box()); $r->print(''); - #$r->print('
'); $r->print('
'); #$r->print('

Step 1

'); $r->print('
'); $r->print(&Apache::lonhtmlcommon::start_pick_box()); &levelmenu($r,\%alllevs,$parmlev); if ($parmlev ne 'general') { - #$r->print('
'); $r->print(&Apache::lonhtmlcommon::row_closure()); - &mapmenu($r,\%allmaps,$pschp,\%maptitles); - #$r->print('
'); - #$r->print(' - #
'); $r->print('
'); $r->print('
'); $r->print(&Apache::lonhtmlcommon::start_pick_box()); @@ -3206,8 +3207,7 @@ ENDOVER &parmboxes($r,\%allparms,\@pscat,\%keyorder); $r->print(&Apache::lonhtmlcommon::start_pick_box()); $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); - #$r->print('
'. - $r->print(''. + $r->print('
'. '
'.&mt('Parts').''.&mt('Section(s)'). ''.&mt('Group(s)').'
'); &partmenu($r,\%allparts,\@psprt); @@ -3242,15 +3242,15 @@ ENDOVER 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 - my $resourcedata=&readdata($crs,$dom); + my $resourcedata=&readdata($crs,$dom); # List data - &listdata($r,$resourcedata,$listdata,$sortorder); + &listdata($r,$resourcedata,$listdata,$sortorder); } $r->print(&tableend(). ((($env{'form.store'}) || ($env{'form.dis'}))?'

':''). @@ -3664,7 +3664,7 @@ ENDMAINFORMHEAD url => '/adm/slotrequest?command=showslots', permission => $vgr, linktitle => "Manage slots for this $lc_crstype." , - icon => 'format-justify-fill.png' , + icon => 'rsrv.png' , }, { linktext => 'Reset Student Access Times', url => '/adm/helper/resettimes.helper', @@ -3715,7 +3715,7 @@ ENDMAINFORMHEAD url => '/adm/parmset?action=parameterchangelog', permission => $parm_permission, 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));