version 1.627.2.26, 2019/02/06 01:10:09
|
version 1.627.2.29, 2019/08/17 23:37:03
|
Line 848 sub set_font_size {
|
Line 848 sub set_font_size {
|
if ($font_size ne '') { |
if ($font_size ne '') { |
|
|
$text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/; |
$text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/; |
|
$text =~ s/\\end\{document}/}\\end{document}/; |
} |
} |
$text =~ s/\\end\{document}/}\\end{document}/; |
|
return $text; |
return $text; |
|
|
|
|
Line 1238 sub is_valid_alpha_code {
|
Line 1238 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. |
my @lines = &Apache::grades::get_scantronformat_file(); |
my @lines = &Apache::lonnet::get_scantronformat_file(); |
foreach my $line (@lines) { |
foreach my $line (@lines) { |
next if (($line =~ /^\#/) || ($line eq '')); |
next if (($line =~ /^\#/) || ($line eq '')); |
my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; |
my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; |
Line 3237 ENDPART
|
Line 3237 ENDPART
|
my $single_code = $helper->{'VARS'}->{'SINGLE_CODE'}; |
my $single_code = $helper->{'VARS'}->{'SINGLE_CODE'}; |
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'}; |
my @lines = &Apache::grades::get_scantronformat_file(); |
my @lines = &Apache::lonnet::get_scantronformat_file(); |
my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10); |
my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10); |
foreach my $line (@lines) { |
foreach my $line (@lines) { |
chomp($line); |
chomp($line); |
Line 3455 ENDPART
|
Line 3455 ENDPART
|
$URLback=$helper->{'VARS'}->{'filename'}; |
$URLback=$helper->{'VARS'}->{'filename'}; |
} elsif ($helper->{VARS}{'symb'}) { |
} elsif ($helper->{VARS}{'symb'}) { |
my ($map, $id, $url) = &Apache::lonnet::decode_symb($helper->{VARS}{'symb'}); |
my ($map, $id, $url) = &Apache::lonnet::decode_symb($helper->{VARS}{'symb'}); |
|
my $cdom =$env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum =$env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my ($anchor,$usehttp); |
$url = &Apache::lonnet::clutter($url); |
$url = &Apache::lonnet::clutter($url); |
|
if (($ENV{'SERVER_PORT'} == 443) && ($env{'request.course.id'}) && |
|
(($url =~ m{^\Q/public/$cdom/$cnum/syllabus\E($|\?)}) || |
|
($url =~ m{^\Q/adm/wrapper/ext/\E(?!https:)}))) { |
|
unless (&Apache::lonnet::uses_sts()) { |
|
$usehttp = 1; |
|
} |
|
} |
if ($env{'request.enc'}) { |
if ($env{'request.enc'}) { |
$url = &Apache::lonenc::encrypted($url); |
$url = &Apache::lonenc::encrypted($url); |
} |
} |
if ($url ne '') { |
if ($url ne '') { |
$URLback = $url.(($url =~ /\?/) ? '&':'?').'symb='.$helper->{VARS}{'symb'}; |
my $symb = $helper->{VARS}{'symb'}; |
|
if ($url =~ m{^\Q/adm/wrapper/ext/\E}) { |
|
my $link = $url; |
|
($link,$anchor) = ($url =~ /^([^\#]+)(?:|(\#[^\#]+))$/); |
|
if ($anchor) { |
|
($symb) = ($helper->{VARS}{'symb'} =~ /^([^\#]+)/); |
|
} |
|
$url = $link; |
|
} |
|
$URLback = $url; |
|
if ($usehttp) { |
|
$URLback .= (($URLback =~ /\?/) ? '&':'?').'usehttp=1'; |
|
} |
|
$URLback .= (($URLback =~ /\?/) ? '&':'?').'symb='.&escape($symb.$anchor); |
} |
} |
} |
} |
# |
# |
Line 4503 ALL_PROBLEMS
|
Line 4526 ALL_PROBLEMS
|
|
|
} |
} |
|
|
my @lines = &Apache::grades::get_scantronformat_file(); |
my @lines = &Apache::lonnet::get_scantronformat_file(); |
my $codechoice=''; |
my $codechoice=''; |
foreach my $line (@lines) { |
foreach my $line (@lines) { |
my ($name,$description,$code_type,$code_length)= |
my ($name,$description,$code_type,$code_length)= |
Line 4808 CHOOSE_FROM_ANY_SEQUENCE
|
Line 4831 CHOOSE_FROM_ANY_SEQUENCE
|
my $xmlfrag = << "FONT_SELECTION"; |
my $xmlfrag = << "FONT_SELECTION"; |
|
|
|
|
<dropdown variable='fontsize' multichoice='0', allowempty='0'> |
<dropdown variable='fontsize' multichoice='0' allowempty='0'> |
<defaultvalue> |
<defaultvalue> |
return 'normalsize'; |
return 'normalsize'; |
</defaultvalue> |
</defaultvalue> |