--- loncom/interface/lonparmset.pm 2009/07/01 17:11:38 1.466 +++ loncom/interface/lonparmset.pm 2011/01/15 15:14:47 1.508 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.466 2009/07/01 17:11:38 bisitz Exp $ +# $Id: lonparmset.pm,v 1.508 2011/01/15 15:14:47 www 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 @@ -333,9 +302,31 @@ use Apache::lonlocal; use Apache::lonnavmaps; use Apache::longroup; use Apache::lonrss; +use HTML::Entities; use LONCAPA qw(:DEFAULT :match); +sub startSettingsScreen { + my ($r,$mode)=@_; + + $r->print("\n".'
'. - ''. - $valout.' |
' + .&mt('Show detailed Parameter Selection') + .'
' + ); $r->print(&Apache::lonhtmlcommon::row_closure(1)); } @@ -1397,6 +1403,7 @@ sub lookUpTableParameter { 'handgrade' => 'grading', 'maxtries' => 'tries', 'hinttries' => 'tries', + 'randomizeontries' => 'tries', 'type' => 'problem_appearance', 'problemstatus' => 'problem_appearance', 'display' => 'problem_appearance', @@ -1453,16 +1460,32 @@ sub whatIsMyCategory { sub keysindisplayorderCategory { my ($name,$keyorder)=@_; return sort { - $$keyorder{'parameter_0_'.$a} <=> $$keyorder{'parameter_0_'.$b}; + $$keyorder{'parameter_0_'.$a} <=> $$keyorder{'parameter_0_'.$b}; } ( @{$name}); } +sub category_order { + return ( + 'time_settings' => 1, + 'grading' => 2, + 'tries' => 3, + 'problem_appearance' => 4, + 'hiding' => 5, + 'behaviour_of_input_fields' => 6, + 'high_level_randomization' => 7, + 'slots' => 8, + 'file_submission' => 9, + 'misc' => 10 + ); + +} sub parmboxes { my ($r,$allparms,$pscat,$keyorder)=@_; my $tempkey; my $tempparameter; my %categories = &categories; + my %category_order = &category_order(); my %categoryList = ( 'time_settings' => [], 'grading' => [], @@ -1474,92 +1497,91 @@ 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('