--- loncom/interface/lonparmset.pm 2009/11/22 21:07:41 1.486 +++ loncom/interface/lonparmset.pm 2010/06/06 02:40:30 1.496 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.486 2009/11/22 21:07:41 www Exp $ +# $Id: lonparmset.pm,v 1.496 2010/06/06 02:40:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -248,37 +248,6 @@ Variables used (guessed by Jeremy): =item parse_key() -=item check_cloners() : - -Checks if new users included in list of allowed cloners -are valid users. Replaces supplied list with -cleaned list containing only users with valid usernames -and domains. - -Inputs: $clonelist, $oldcloner -where $clonelist is ref to array of requested cloners, -and $oldcloner is ref to array of currently allowed -cloners. - -Returns: string - comma separated list of requested -cloners (username:domain) who do not exist in system. - -=item change_clone() : - -Modifies the list of courses a user can clone (stored -in the user's environment.db file), called when a -change is made to the list of users allowed to clone -a course. - -Inputs: $action,$cloner -where $action is add or drop, and $cloner is identity of -user for whom cloning ability is to be changed in course. - - -=item check_cloners() - -=item change_clone() - =item header() Output html header for page @@ -1361,13 +1330,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)); } @@ -1493,13 +1466,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 @@ -1541,45 +1524,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 { @@ -1711,11 +1682,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 { @@ -2188,7 +2154,6 @@ function parmsel_show() { ENDPARMSELSCRIPT - # Display Unit 1 "General Parameters" if (!$pssymb) { my $parmselhiddenstyle=' style="display:none"'; if($env{'form.hideparmsel'} eq 'hidden') { @@ -2197,6 +2162,7 @@ ENDPARMSELSCRIPT $r->print('
'); } + # Step 1 $r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification'))); $r->print(< @@ -2219,26 +2185,33 @@ 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(&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()); - #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('