version 1.540, 2008/09/16 02:02:31
|
version 1.543, 2008/10/02 17:12:18
|
Line 392 sub is_valid_alpha_code {
|
Line 392 sub is_valid_alpha_code {
|
sub is_code_valid { |
sub is_code_valid { |
my ($code_value, $code_option) = @_; |
my ($code_value, $code_option) = @_; |
my ($code_type, $code_length) = ('letter', 6); # defaults. |
my ($code_type, $code_length) = ('letter', 6); # defaults. |
open(FG, $Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); |
my @lines = &Apache::grades::get_scantronformat_file(); |
foreach my $line (<FG>) { |
foreach my $line (@lines) { |
my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; |
my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; |
if($name eq $code_option) { |
if($name eq $code_option) { |
$code_length = $length; |
$code_length = $length; |
Line 1160 sub print_latex_header {
|
Line 1160 sub print_latex_header {
|
'\usepackage{wrapfig}'. |
'\usepackage{wrapfig}'. |
'\usepackage{picins}\usepackage{calc}'."\n". |
'\usepackage{picins}\usepackage{calc}'."\n". |
'\usepackage[T1]{fontenc}'."\n". |
'\usepackage[T1]{fontenc}'."\n". |
|
'\usepackage{lmodern}'."\n". |
'\usepackage[postscript]{ucs}'."\n". |
'\usepackage[postscript]{ucs}'."\n". |
'\usepackage[utf8x]{inputenc}'."\n". |
'\usepackage[utf8x]{inputenc}'."\n". |
'\usepackage{pifont}' . "\n". |
'\usepackage{pifont}' . "\n". |
Line 1942 ENDPART
|
Line 1943 ENDPART
|
my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'}; |
my $selected_code = $helper->{'VARS'}->{'CODE_SELECTED_FROM_LIST'}; |
|
|
my $code_option=$helper->{'VARS'}->{'CODE_OPTION'}; |
my $code_option=$helper->{'VARS'}->{'CODE_OPTION'}; |
open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); |
my @lines = &Apache::grades::get_scantronformat_file(); |
my ($code_type,$code_length)=('letter',6); |
my ($code_type,$code_length)=('letter',6); |
foreach my $line (<FH>) { |
foreach my $line (@lines) { |
my ($name,$type,$length) = (split(/:/,$line))[0,2,4]; |
my ($name,$type,$length) = (split(/:/,$line))[0,2,4]; |
if ($name eq $code_option) { |
if ($name eq $code_option) { |
$code_length=$length; |
$code_length=$length; |
Line 2649 sub printHelper {
|
Line 2650 sub printHelper {
|
# Useful filter strings |
# Useful filter strings |
my $isProblem = '($res->is_problem()||$res->contains_problem||$res->is_practice()) '; |
my $isProblem = '($res->is_problem()||$res->contains_problem||$res->is_practice()) '; |
$isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden; |
$isProblem .= ' && !$res->randomout()' if !$userCanSeeHidden; |
my $isProblemOrMap = '$res->is_problem() || $res->contains_problem() || $res->is_sequence()'; |
my $isProblemOrMap = '$res->is_problem() || $res->contains_problem() || $res->is_sequence() || $res->is_practice()'; |
my $isNotMap = '!$res->is_sequence()'; |
my $isNotMap = '!$res->is_sequence()'; |
$isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden; |
$isNotMap .= ' && !$res->randomout()' if !$userCanSeeHidden; |
my $isMap = '$res->is_map()'; |
my $isMap = '$res->is_map()'; |
Line 2860 CHOOSE_STUDENTS
|
Line 2861 CHOOSE_STUDENTS
|
|
|
} |
} |
|
|
|
my @lines = &Apache::grades::get_scantronformat_file(); |
open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); |
|
my $codechoice=''; |
my $codechoice=''; |
foreach my $line (<FH>) { |
foreach my $line (@lines) { |
my ($name,$description,$code_type,$code_length)= |
my ($name,$description,$code_type,$code_length)= |
(split(/:/,$line))[0,1,2,4]; |
(split(/:/,$line))[0,1,2,4]; |
if ($code_length > 0 && |
if ($code_length > 0 && |