--- loncom/interface/lonparmset.pm 2003/11/18 22:18:42 1.136 +++ loncom/interface/lonparmset.pm 2003/12/04 20:06:29 1.140 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.136 2003/11/18 22:18:42 albertel Exp $ +# $Id: lonparmset.pm,v 1.140 2003/12/04 20:06:29 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -131,12 +131,12 @@ sub parmval { # -------------------------------------------------------- first, check default - if ($def) { $outpar[11]=$def; $result=11; } + if (defined($def)) { $outpar[11]=$def; $result=11; } # ----------------------------------------------------- second, check map parms my $thisparm=$parmhash{$symbparm}; - if ($thisparm) { $outpar[10]=$thisparm; $result=10; } + if (defined($thisparm)) { $outpar[10]=$thisparm; $result=10; } # --------------------------------------------------------- third, check course @@ -285,7 +285,7 @@ sub plink { sub startpage { - my ($r,$id,$udom,$csec,$uname,$have_assesments)=@_; + my ($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader)=@_; my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','', 'onUnload="pclose()"'); @@ -354,7 +354,9 @@ sub startpage { $selscript $bodytag +ENDHEAD + unless ($trimheader) {$r->print(<

$lt{'cep'}

@@ -370,9 +372,12 @@ $bodytag
+ENDHEAD2 +} + $r->print(<

$lt{'captm'}

-ENDHEAD +ENDHEAD3 if (!$have_assesments) { $r->print(''.&mt('There are no assesment parameters in this course to set.').'
'); @@ -689,6 +694,7 @@ sub assessparms { my $pssymb=''; my $parmlev=''; + my $trimheader=''; my $prevvisit=$ENV{'form.prevvisit'}; # unless ($parmlev==$ENV{'form.parmlev'}) { @@ -711,11 +717,13 @@ sub assessparms { if (!@pscat) { @pscat=('all'); } $pschp=''; $parmlev = 'full'; + $trimheader='yes'; } elsif ($ENV{'form.symb'}) { $pssymb=$ENV{'form.symb'}; if (!@pscat) { @pscat=('all'); } $pschp=''; $parmlev = 'full'; + $trimheader='yes'; } else { $ENV{'form.url'}=''; } @@ -905,7 +913,7 @@ sub assessparms { my $have_assesments=1; if (scalar(keys(%allkeys)) eq 0) { $have_assesments=0; } - &startpage($r,$id,$udom,$csec,$uname,$have_assesments); + &startpage($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader); if (!$have_assesments) { untie(%bighash); @@ -1091,9 +1099,9 @@ sub assessparms { 'rl' => "Resource Level", 'ic' => 'in Course', 'aut' => "Assessment URL and Title", - 'type' => 'Type', + 'type' => &mt('Type'), 'emof' => "Enclosing Map or Folder", - 'part' => 'Part', + 'part' => &mt('Part'), 'pn' => 'Parameter Name', 'def' => 'default', 'femof' => 'from Enclosing Map or Folder', @@ -1499,26 +1507,29 @@ sub crsenv { # -------------------------------------------------------- Get parameters again my %values=&Apache::lonnet::dump('environment',$dom,$crs); + my $SelectStyleFile=&mt('Select Style File'); my $output=''; if (! exists($values{'con_lost'})) { my %descriptions= - ('url' => 'Top Level Map '. + ('url' => ''.&mt('Top Level Map').' '. '". - 'Select Map
'. - 'Modification may make assessment data '. - 'inaccessible', - 'description' => 'Course Description', - 'courseid' => 'Course ID or number
'. - '(internal, optional)', - 'grading' => 'Grading'. - '"standard" or any other value. '. - 'Default for new courses is "standard".', - - 'default_xml_style' => 'Default XML Style File '. + &mt('Select Map').'
'. + &mt('Modification may make assessment data inaccessible'). + '', + 'description' => ''.&mt('Course Description').'', + 'courseid' => ''.&mt('Course ID').' '.&mt('or').' '.&mt('number'). + '
'. + '('.&mt('internal').', '.&mt('optional').')', + 'grading' => ''.&mt('Grading').''. + ' "'.&mt('standard').'", "'.&mt('external').'", '. + &mt('or any other value').'.'. + ' '.&mt('Default for new courses is').' "'. + &mt('standard').'".', + 'default_xml_style' => ''.&mt('Default XML Style File').' '. 'Select Style File
", + ",'sty')\">$SelectStyleFile
", 'question.email' => 'Feedback Addresses for Resource Content '. 'Questions
(user:domain,'. 'user:domain(section;section;...;*;...),...)', @@ -1570,9 +1581,9 @@ sub crsenv { => 'Allow limited HTML in discussion posts
'. '(Set value to "yes" to allow)', 'rndseed' - => 'Randomization algorithm used
'. - 'Modifying this will make problems '. - 'have different numbers and answers', + => ''.&mt('Randomization algorithm used').'
'. + ''.&mt('Modifying this will make problems').' '. + &mt('have different numbers and answers').'', 'problem_stream_switch' => 'Allow problems to be split over pages
'. ' ("yes" if allowed, anything else if not)', @@ -1583,7 +1594,7 @@ sub crsenv { 'when enrolling students', 'default_enrollment_end_date' => 'Default ending date '. 'when enrolling students', - 'languages' => 'Languages used', + 'languages' => ''.&mt('Languages used').'', 'disable_receipt_display' => 'Disable display of problem receipts
'. ' ("yes" to disable, anything else if not)' @@ -1646,6 +1657,8 @@ sub crsenv { $onchange.' />'. ''; } + my $Parameter=&mt('Parameter'); + my $Value=&mt('Value'); $r->print(<