--- loncom/interface/lonparmset.pm 2004/02/02 20:21:25 1.150 +++ loncom/interface/lonparmset.pm 2004/04/27 19:11:14 1.156 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.150 2004/02/02 20:21:25 www Exp $ +# $Id: lonparmset.pm,v 1.156 2004/04/27 19:11:14 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -359,7 +359,7 @@ sub startpage { $selscript $bodytag -$overallhelp + ENDHEAD unless ($trimheader) {$r->print(<print(''.$parm.''); + $r->print(''.&mt($parm).''); my $thismarker=$which; $thismarker=~s/^parameter\_//; @@ -587,7 +587,8 @@ sub extractResourceInformation { my $resid=$2; my $id=$mapid.'.'.$resid; my $srcf=$$bighash{$_}; - if ($srcf=~/\.(problem|exam|quiz|assess|survey|form)$/) { +# if ($srcf=~/\.(problem|exam|quiz|assess|survey|form)$/) { + if (1) { $$ids[$#$ids+1]=$id; $$typep{$id}=$1; $$keyp{$id}=''; @@ -1151,8 +1152,10 @@ ENDTABLEHEADFOUR my $rid=$_; my ($inmapid)=($rid=~/\.(\d+)$/); - if (($pschp eq 'all') || ($allmaps{$pschp} eq $mapp{$rid}) || - ($pssymb eq $symbp{$rid})) { + if ((!$pssymb && + (($pschp eq 'all') || ($allmaps{$pschp} eq $mapp{$rid}))) + || + ($pssymb && $pssymb eq $symbp{$rid})) { # ------------------------------------------------------ Entry for one resource if ($defbgone eq '"E0E099"') { $defbgone='"E0E0DD"'; @@ -1196,7 +1199,8 @@ ENDTABLEHEADFOUR '>'. join(' / ',split(/\//,$uri)). '

'. - "$title"); @@ -1496,7 +1500,7 @@ sub crsenv { } # # Let the user know we made the changes - if ($name) { + if ($name && defined($value)) { my $put_result = &Apache::lonnet::put('environment', {$name=>$value},$dom,$crs); if ($put_result eq 'ok') { @@ -1589,6 +1593,9 @@ sub crsenv { => ''.&mt('Randomization algorithm used').'
'. ''.&mt('Modifying this will make problems').' '. &mt('have different numbers and answers').'', + 'receiptalg' + => ''.&mt('Receipt algorithm used').'
'. + &mt('This controls how receipt numbers are generated.'), 'problem_stream_switch' => ''.&mt('Allow problems to be split over pages').'
'. ' ("'.&mt('yes').'" '.&mt('if allowed, anything else if not').')', @@ -1615,6 +1622,7 @@ sub crsenv { 'languages', 'nothideprivileged', 'rndseed', + 'receiptalg', 'problem_stream_switch', 'disable_receipt_display', 'spreadsheet_default_classcalc', @@ -1671,31 +1679,11 @@ sub crsenv { my $Parameter=&mt('Parameter'); my $Value=&mt('Value'); my $Set=&mt('Set'); + my $browse_js=&Apache::loncommon::browser_and_searcher_javascript(); $r->print(< LON-CAPA Course Environment @@ -1769,7 +1757,7 @@ ENDOVER push (@deldata,$thiskey); } elsif ($cmd eq 'datepointer') { my $data=&Apache::lonhtmlcommon::get_date_from_form($ENV{$_}); - if ($olddata{$thiskey} ne $data) { $newdata{$thiskey}=$data; } + if (defined($data) and $olddata{$thiskey} ne $data) { $newdata{$thiskey}=$data; } } } }