version 1.20, 2010/03/22 15:39:37
|
version 1.22, 2012/09/14 11:24:06
|
Line 130 sub get_javascripts() {
|
Line 130 sub get_javascripts() {
|
// <![CDATA[ |
// <![CDATA[ |
function checkFilename(form) { |
function checkFilename(form) { |
var fileExt = form.file.value; |
var fileExt = form.file.value; |
fileExt = fileExt.match(/[.]pdf\$/g); |
fileExt = fileExt.match(/[.]pdf\$/gi); |
if(fileExt) { |
if(fileExt) { |
return true; |
return true; |
} |
} |
Line 299 sub grade_pdf {
|
Line 299 sub grade_pdf {
|
$result .= '<td><a href="/res/'.$problem{'resource'}. |
$result .= '<td><a href="/res/'.$problem{'resource'}. |
'?symb='. |
'?symb='. |
&HTML::Entities::encode($problem{'symb'},'"&<>'). |
&HTML::Entities::encode($problem{'symb'},'"&<>'). |
'">'.$problemname.'</a></td><td class="'; |
'">'.$problemname.'</a></td><td><span class="'; |
if ($grade eq "EXACT_ANS" || $grade eq "APPROX_ANS") { |
if ($grade eq "EXACT_ANS" || $grade eq "APPROX_ANS") { |
$result .= 'LC_answer_correct'; |
$result .= 'LC_answer_correct'; |
} else { |
} elsif ($grade eq "DRAFT") { |
|
$result .= 'LC_answer_not_charged_try'; |
|
} else { |
$result .= 'LC_answer_charged_try'; |
$result .= 'LC_answer_charged_try'; |
} |
} |
$result .= '">'; |
$result .= '">'; |
Line 375 sub parse_grade_answer {
|
Line 377 sub parse_grade_answer {
|
my %answerhash = ('EXACT_ANS' => &mt('You are correct.'), |
my %answerhash = ('EXACT_ANS' => &mt('You are correct.'), |
'APPROX_ANS' => &mt('You are correct.'), |
'APPROX_ANS' => &mt('You are correct.'), |
'INCORRECT' => &mt('You are incorrect'), |
'INCORRECT' => &mt('You are incorrect'), |
|
'DRAFT' => &mt('Copy saved but not submitted.'), |
); |
); |
|
|
foreach my $key (keys %answerhash) { |
foreach my $key (keys %answerhash) { |