'.$/;
}
@@ -2433,9 +2444,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) &&
@@ -2457,9 +2471,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'} &&
@@ -2472,17 +2487,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
@@ -2490,7 +2504,7 @@ CHOOSE_ANON1
if ($helper->{VARS}->{'assignment'}) {
push @{$printChoices}, [&mt("Selected Resources from folder [_1] for selected students",$sequenceTitle), 'resources_for_students', 'CHOOSE_STUDENTS1'];
- push @{$printChoices}, [&mt("Selected Resources from folder [_1] for anonymous students",$sequenceTitle), 'resources_for_anon', 'CHOOSE_ANON2'];
+ push @{$printChoices}, [&mt("Selected Resources from folder [_1] for CODEd assignments",$sequenceTitle), 'resources_for_anon', 'CHOOSE_ANON2'];
}
@@ -2503,7 +2517,7 @@ CHOOSE_ANON1
return $isNotMap;
$map
return $symbFilter;
-
+ $start_new_option
@@ -2541,9 +2555,12 @@ RESOURCE_SELECTOR
CHOOSE_STUDENTS1
&Apache::lonxml::xmlparse($r, 'helper', <
+
SELECT_RESOURCES
- 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) &&
@@ -2565,9 +2582,9 @@ CHOOSE_STUDENTS1
$codechoice
- |
|
- |
- Enter a CODE to print: |
+ | |
+
Print a Specific CODE
+ Enter a CODE to print: |
if(!\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'} &&
@@ -2580,15 +2597,16 @@ CHOOSE_STUDENTS1
}
- |
|
+ |
$code_selection
- Reprint a set of saved CODEs:
+ |
+
Reprint a Set of Saved CODEs
+ Select saved CODEs:
|
$namechoice
|
-
$resource_selector
CHOOSE_ANON2
@@ -2644,10 +2662,10 @@ CHOOSE_FROM_SUBDIR
PAGESIZE
- return $isProblem
+ return $isNotMap
return '$escapedSequenceName';
return $symbFilter;
-
+ $start_new_option
CHOOSE_FROM_ANY_SEQUENCE
@@ -2973,10 +2991,10 @@ sub new {
# $helper->{VARS} to figure out whether the columns are one or two
$self->{'formatvar'} = shift;
- # The state to transition to after selection, or after discovering
- # the cols are not set to 1
+
$self->{NEXTSTATE} = shift;
bless($self);
+
return $self;
}
@@ -2986,66 +3004,141 @@ sub render {
my $result = '';
my $var = $self->{'variable'};
+
+
if (defined $self->{ERROR_MSG}) {
- $result .= ' ' . $self->{ERROR_MSG} . ' ';
+ $result .= ' ' . $self->{ERROR_MSG} . ' ';
}
- my $width = 18;
my $format = $helper->{VARS}->{$self->{'formatvar'}};
- if (substr($format, 2, 1) ne '1') {
- $width = 9;
+
+ # Use format to get sensible defaults for the margins:
+
+
+ my ($laystyle, $cols, $papersize) = split(/\|/, $format);
+ ($papersize) = split(/ /, $papersize);
+
+
+ if ($laystyle eq 'L') {
+ $laystyle = 'album';
+ } else {
+ $laystyle = 'book';
}
+
+ my %size;
+ ($size{'width_and_units'},
+ $size{'height_and_units'},
+ $size{'margin_and_units'})=
+ &Apache::lonprintout::page_format($papersize, $laystyle, $cols);
+
+ 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'} .= ' |
|
|