Print: ");
$paramHash = Apache::lonhelper::getParamHash();
@@ -2060,15 +2082,14 @@ CHOOSE_FROM_ANY_SEQUENCE
$paramHash->{CHOICES} = [
['Without Answers', 'yes'],
['With Answers', 'no'],
- ['Only Answers', 'only'],
- ['As Exam Problem', 'exam']
+ ['Only Answers', 'only']
];
Apache::lonhelper::dropdown->new();
addMessage(" ");
$startedTable = 1;
}
- if ($ENV{'request.role.adv'}) {
+ if ($env{'request.role.adv'}) {
if (!$startedTable) {
addMessage("LaTeX mode: ");
$startedTable = 1;
@@ -2118,10 +2139,24 @@ CHOOSE_FROM_ANY_SEQUENCE
['Yes', 'yes'] ];
Apache::lonhelper::dropdown->new();
addMessage(" ");
+
+ # If advanced roles, then allow to show all foils.
+
+ if ($env{'request.role.adv'}) {
+ addMessage(" ");
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{'multichoice'} = "true";
+ $paramHash->{'allowempty'} = "true";
+ $paramHash->{'variable'} = "showallfoils";
+ $paramHash->{'CHOICES'} = [ ["Show all foils", "1"] ];
+ Apache::lonhelper::choices->new();
+ addMessage(" ");
+ }
+
}
if ($helper->{'VARS'}->{'construction'}) {
- my $stylevalue=$ENV{'construct.style'};
+ my $stylevalue=$env{'construct.style'};
my $xmlfrag .= <<"RNDSEED";
Use random seed:
@@ -2132,10 +2167,15 @@ CHOOSE_FROM_ANY_SEQUENCE
Use style file:
Select style file
+
+ Show all foils?
+
RNDSEED
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
- $helper->{'VARS'}->{'style_file'}=$ENV{'form.style_file_value'};
- }
+ $helper->{'VARS'}->{'style_file'}=$env{'form.style_file_value'};
+
+ }
+
}
@@ -2202,6 +2242,7 @@ no strict;
@ISA = ("Apache::lonhelper::element");
use strict;
use Apache::lonlocal;
+use Apache::lonnet;
my $maxColumns = 2;
my @paperSize = ("letter [8 1/2x11 in]", "legal [8 1/2x14 in]",
@@ -2262,7 +2303,7 @@ STATEHTML
$result .= "\n";
$result .= "\n";
- my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
+ my %parmhash=&Apache::lonnet::coursedescription($env{'request.course.id'});
my $DefaultPaperSize=$parmhash{'default_paper_size'};
if ($DefaultPaperSize eq '') {$DefaultPaperSize='letter';}
$i = 0;
@@ -2286,8 +2327,8 @@ sub postprocess {
my $var = $self->{'variable'};
my $helper = Apache::lonhelper->getHelper();
$helper->{VARS}->{$var} =
- $ENV{"form.$var.layout"} . '|' . $ENV{"form.$var.cols"} . '|' .
- $ENV{"form.$var.paper"};
+ $env{"form.$var.layout"} . '|' . $env{"form.$var.cols"} . '|' .
+ $env{"form.$var.paper"};
return 1;
}
@@ -2317,7 +2358,7 @@ is no tag interface. You actually pass p
=cut
use Apache::lonhelper;
-
+use Apache::lonnet;
no strict;
@ISA = ("Apache::lonhelper::element");
use strict;
@@ -2415,12 +2456,12 @@ sub postprocess {
my $var = $self->{'variable'};
my $helper = Apache::lonhelper->getHelper();
- my $width = $helper->{VARS}->{$var .'.width'} = $ENV{"form.${var}.width"};
- my $height = $helper->{VARS}->{$var .'.height'} = $ENV{"form.${var}.height"};
- my $lmargin = $helper->{VARS}->{$var .'.lmargin'} = $ENV{"form.${var}.lmargin"};
- $helper->{VARS}->{$var .'.widthunit'} = $ENV{"form.${var}.widthunit"};
- $helper->{VARS}->{$var .'.heightunit'} = $ENV{"form.${var}.heightunit"};
- $helper->{VARS}->{$var .'.lmarginunit'} = $ENV{"form.${var}.lmarginunit"};
+ my $width = $helper->{VARS}->{$var .'.width'} = $env{"form.${var}.width"};
+ my $height = $helper->{VARS}->{$var .'.height'} = $env{"form.${var}.height"};
+ my $lmargin = $helper->{VARS}->{$var .'.lmargin'} = $env{"form.${var}.lmargin"};
+ $helper->{VARS}->{$var .'.widthunit'} = $env{"form.${var}.widthunit"};
+ $helper->{VARS}->{$var .'.heightunit'} = $env{"form.${var}.heightunit"};
+ $helper->{VARS}->{$var .'.lmarginunit'} = $env{"form.${var}.lmarginunit"};
my $error = '';