'.$/;
}
@@ -2426,9 +2433,12 @@ CHOOSE_STUDENTS
$codechoice='Default';
}
&Apache::lonxml::xmlparse($r, 'helper', <
+
SELECT_PROBLEMS
- Number of anonymous assignments to print: |
+ Fill out one of the forms below
+
+ Generate new CODEd Assignments
+ Number of CODEd assignments to print: |
if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) &&
@@ -2450,9 +2460,10 @@ CHOOSE_STUDENTS
$codechoice
- |
|
- |
- Enter a CODE to print: |
+ | |
+ | |
+
Print a Specific Code
+ Enter a CODE to print: |
if(!\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'} &&
@@ -2465,17 +2476,16 @@ CHOOSE_STUDENTS
}
- |
|
+ |
$code_selection
-
-
- Reprint a set of saved CODEs:
+ |
+
Reprint a Set of Saved Codes
+ Select saved CODEs:
|
$namechoice
|
-
$resource_selector
CHOOSE_ANON1
@@ -2496,7 +2506,7 @@ CHOOSE_ANON1
return $isNotMap;
$map
return $symbFilter;
-
+ $start_new_option
@@ -2637,10 +2647,10 @@ CHOOSE_FROM_SUBDIR
PAGESIZE
- return $isProblem
+ return $isNotMap
return '$escapedSequenceName';
return $symbFilter;
-
+ $start_new_option
CHOOSE_FROM_ANY_SEQUENCE
@@ -2969,6 +2979,7 @@ sub new {
$self->{NEXTSTATE} = shift;
bless($self);
+
return $self;
}
@@ -2978,8 +2989,10 @@ sub render {
my $result = '';
my $var = $self->{'variable'};
+
+
if (defined $self->{ERROR_MSG}) {
- $result .= ' ' . $self->{ERROR_MSG} . ' ';
+ $result .= ' ' . $self->{ERROR_MSG} . ' ';
}
my $format = $helper->{VARS}->{$self->{'formatvar'}};
@@ -2998,90 +3011,122 @@ sub render {
}
-
- my ($width_and_units,
- $height_and_units,
- $margin_and_units) =
- &Apache::lonprintout::page_format($papersize, $laystyle, $cols);
-
-
- my ($width, $wunits) = split(/ /, $width_and_units);
- my ($height, $hunits) = split(/ /, $height_and_units);
- my ($margin, $munits) = split(/ /, $margin_and_units);
-
-
-
- # This code is a bit ugly and not very scalable with additional units.
- # but I'm not sure my poor perlmanship knows a better way yet RF
-
- my ($wuoptions, $huoptions, $muoptions);
+ my %size;
+ ($size{'width_and_units'},
+ $size{'height_and_units'},
+ $size{'margin_and_units'})=
+ &Apache::lonprintout::page_format($papersize, $laystyle, $cols);
- if ($wunits eq 'cm') {
- $wuoptions = '';
- } else {
- $wuoptions = '';
- }
- if ($hunits eq 'cm') {
- $huoptions = '';
- } else {
- $huoptions = '';
- }
- if ($munits eq 'cm') {
- $muoptions = '';
- } else {
- $muoptions = '';
+ foreach my $dimension ('width','height','margin') {
+ ($size{$dimension},$size{$dimension.'_unit'}) =
+ split(/ +/, $size{$dimension.'_and_units'},2);
+
+ foreach my $unit ('cm','in') {
+ $size{$dimension.'_options'} .= ' |
|