--- loncom/interface/lonparmset.pm 2004/05/27 17:31:47 1.161 +++ loncom/interface/lonparmset.pm 2004/08/17 20:27:04 1.173 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.161 2004/05/27 17:31:47 sakharuk Exp $ +# $Id: lonparmset.pm,v 1.173 2004/08/17 20:27:04 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,7 +91,7 @@ my $coursename; Figure out a cascading parameter. Inputs: $what - a parameter spec (incluse part info and name I.E. 0.weight) - $id - a bighash Id /home/httpd/lib/perl/Apache/localize/ru.pmnumber + $id - a bighash Id number $def - the resource's default value 'stupid emacs Returns: A list, the first item is the index into the remaining list of items of parm valuse that is the active one, the list consists of parm values at the 11 possible levels @@ -307,9 +307,7 @@ sub startpage { 'ad' => "at Domain" ); my $overallhelp= - &Apache::loncommon::help_open_topic("Course_Setting_Parameters"). - &Apache::loncommon::help_open_faq(10). - &Apache::loncommon::help_open_bug('Instructor Interface'); + &Apache::loncommon::help_open_menu('','Setting Parameters','Course_Setting_Parameters','',10,'Instructor Interface'); my $assessparmhelp=&Apache::loncommon::help_open_topic("Cascading_Parameters","Assessment Parameters"); $r->print(< @@ -359,7 +357,7 @@ sub startpage { $selscript $bodytag - +$overallhelp ENDHEAD unless ($trimheader) {$r->print(<: hash, id->type, where "type" contains the extension of the file, thus, I. -=item B: hash, id->key list, will contain a comma seperated list of the meta-data keys available for the given id +=item B: hash, id->key list, will contain a comma separated list of the meta-data keys available for the given id =item B: hash, name of parameter->display value (what is the display value?) @@ -587,8 +585,8 @@ sub extractResourceInformation { my $resid=$2; my $id=$mapid.'.'.$resid; my $srcf=$$bighash{$_}; -# if ($srcf=~/\.(problem|exam|quiz|assess|survey|form)$/) { if (1) { + $srcf=~/\.(\w+)$/; $$ids[$#$ids+1]=$id; $$typep{$id}=$1; $$keyp{$id}=''; @@ -597,6 +595,10 @@ sub extractResourceInformation { my $key=$_; my $allkey=$1; $allkey=~s/\_/\./g; + if (&Apache::lonnet::metadata($srcf,$key.'.hidden') eq + 'parm') { + next; #hide hidden things + } my $display= &Apache::lonnet::metadata($srcf,$key.'.display'); my $name=&Apache::lonnet::metadata($srcf,$key.'.name'); my $part= &Apache::lonnet::metadata($srcf,$key.'.part'); @@ -691,8 +693,12 @@ sub assessparms { my $message=''; $csec=$ENV{'form.csec'}; - $udom=$ENV{'form.udom'}; - unless ($udom) { $udom=$r->dir_config('lonDefDomain'); } + if ($udom=$ENV{'form.udom'}) { + } elsif ($udom=$ENV{'request.role.domain'}) { + } elsif ($udom=$ENV{'user.domain'}) { + } else { + $udom=$r->dir_config('lonDefDomain'); + } my @pscat=&Apache::loncommon::get_env_multiple('form.pscat'); my $pschp=$ENV{'form.pschp'}; @@ -1337,6 +1343,7 @@ ENDMAPONE $r->print(''.&mt('Parameter in Effect').''); foreach (sort keys %name) { + $r->print(''); &print_row($r,$_,\%part,\%name,$mapid,\%default, \%type,\%display,$defbgone,$defbgtwo, $parmlev); @@ -1414,6 +1421,7 @@ ENDMAPONE $r->print(''.&mt('Parameter in Effect').''); foreach (sort keys %name) { + $r->print(''); &print_row($r,$_,\%part,\%name,$mapid,\%default, \%type,\%display,$defbgone,$defbgtwo,$parmlev); # $r->print("resource.$part{$_}.$name{$_},$symbp{$mapid}\n"); @@ -1553,6 +1561,7 @@ sub crsenv { 'pageseparators' => ''.&mt('Visibly Separate Items on Pages').'
'. '('.&mt('"[_1]" for visible separation','yes').', '. &mt('changes will not show until next login').')', + 'student_classlist_view' => ''.&mt('Allow students to view classlist.').''.&mt('("all":students can view all sections,"section":students can only view their own section.blank or "disabled" prevents student view.'), 'plc.roles.denied'=> ''.&mt('Disallow live chatroom use for Roles'). '
"st": '. @@ -1591,6 +1600,9 @@ sub crsenv { 'allow_limited_html_in_feedback' => ''.&mt('Allow limited HTML in discussion posts').'
'. '('.&mt('Set value to "[_1]" to allow',"yes").')', + 'allow_discussion_post_editing' + => ''.&mt('Allow users to edit/delete their own discussion posts').'
'. + '('.&mt('Set value to "[_1]" to allow',"yes").')', 'rndseed' => ''.&mt('Randomization algorithm used').'
'. ''.&mt('Modifying this will make problems').' '. @@ -1598,6 +1610,9 @@ sub crsenv { 'receiptalg' => ''.&mt('Receipt algorithm used').'
'. &mt('This controls how receipt numbers are generated.'), + 'suppress_tries' + => ''.&mt('Suppress number of tries in printing').'('. + &mt('yes if supress').')', 'problem_stream_switch' => ''.&mt('Allow problems to be split over pages').'
'. ' ('.&mt('"[_1]" if allowed, anything else if not','yes').')', @@ -1617,20 +1632,26 @@ sub crsenv { 'disable_receipt_display' => ''.&mt('Disable display of problem receipts').'
'. ' ('.&mt('"[_1]" to disable, anything else if not','yes').')', + 'disablesigfigs' + => ''.&mt('Disable checking of Significant Figures').'
'. + ' ('.&mt('"[_1]" to disable, anything else if not','yes').')', 'tthoptions' => ''.&mt('Default set of options to pass to tth/m when converting tex').'' ); my @Display_Order = ('url','description','courseid','grading', 'default_xml_style','pageseparators', 'question.email','comment.email','policy.email', + 'student_classlist_view', 'plc.roles.denied','plc.users.denied', 'pch.roles.denied','pch.users.denied', 'allow_limited_html_in_feedback', + 'allow_discussion_post_editing', 'languages', 'nothideprivileged', 'rndseed', 'receiptalg', 'problem_stream_switch', + 'suppress_tries', 'default_paper_size', 'disable_receipt_display', 'spreadsheet_default_classcalc', @@ -1639,7 +1660,8 @@ sub crsenv { 'hideemptyrows', 'default_enrollment_start_date', 'default_enrollment_end_date', - 'tthoptions' + 'tthoptions', + 'disablesigfigs' ); foreach my $parameter (sort(keys(%values))) { unless ($parameter =~ m/^internal\./) { @@ -1694,7 +1716,7 @@ sub crsenv { my $Parameter=&mt('Parameter'); my $Value=&mt('Value'); my $Set=&mt('Set'); - my $browse_js=&Apache::loncommon::browser_and_searcher_javascript(); + my $browse_js=&Apache::loncommon::browser_and_searcher_javascript('parmset'); $r->print(<