version 1.474, 2008/03/12 02:46:03
|
version 1.479, 2008/05/29 15:43:01
|
Line 1080 Optional Arguments:
|
Line 1080 Optional Arguments:
|
|
|
sub increment_counter { |
sub increment_counter { |
my ($increment, $part_response) = @_; |
my ($increment, $part_response) = @_; |
|
if ($env{'form.grade_target'} eq 'analyze') { return; } |
if (!defined($increment) || $increment le 0) { |
if (!defined($increment) || $increment le 0) { |
$increment = 1; |
$increment = 1; |
} |
} |
Line 1496 sub verify_html {
|
Line 1497 sub verify_html {
|
return ''; |
return ''; |
} |
} |
|
|
|
sub renderingoptions { |
|
my %langchoices=('' => ''); |
|
foreach (&Apache::loncommon::languageids()) { |
|
if (&Apache::loncommon::supportedlanguagecode($_)) { |
|
$langchoices{&Apache::loncommon::supportedlanguagecode($_)} |
|
= &Apache::loncommon::plainlanguagedescription($_); |
|
} |
|
} |
|
return |
|
'<span class="LC_nobreak">'. |
|
&mt('Language:').' '. |
|
&Apache::loncommon::select_form($env{'form.languages'},'languages', |
|
%langchoices).' |
|
</span> |
|
<span class="LC_nobreak">'. |
|
&mt('Math Rendering:').' '. |
|
&Apache::loncommon::select_form($env{'form.texengine'},'texengine', |
|
('' => '', |
|
'tth' => 'tth (Tex-to-HTML)', |
|
'jsMath' => 'jsMath', |
|
'mimetex' => 'mimetex (Convert to Images)')).' |
|
</span>'; |
|
} |
|
|
sub inserteditinfo { |
sub inserteditinfo { |
my ($filecontents, $filetype, $filename)=@_; |
my ($filecontents, $filetype, $filename)=@_; |
$filecontents = &HTML::Entities::encode($filecontents,'<>&"'); |
$filecontents = &HTML::Entities::encode($filecontents,'<>&"'); |
Line 1559 FULLPAGE
|
Line 1584 FULLPAGE
|
my $form_events = &Apache::edit::form_change_detection(); |
my $form_events = &Apache::edit::form_change_detection(); |
my $htmlerror=&verify_html($filecontents); |
my $htmlerror=&verify_html($filecontents); |
if ($htmlerror) { |
if ($htmlerror) { |
$htmlerror='<span class="LC_error">'.$htmlerror.'</span></p>'; |
$htmlerror='<span class="LC_error">'.$htmlerror.'</span>'; |
} |
} |
my $editfooter=(<<ENDFOOTER); |
my $editfooter=(<<ENDFOOTER); |
$initialize |
$initialize |
Line 1761 sub display_title {
|
Line 1786 sub display_title {
|
$title = $env{'request.filename'}; |
$title = $env{'request.filename'}; |
$title = substr($title, rindex($title, '/') + 1); |
$title = substr($title, rindex($title, '/') + 1); |
} |
} |
$result = "<script type='text/javascript'>top.document.title = '$title - LON-CAPA Construction Space';</script>"; |
$result = "<script type='text/javascript'>top.document.title = '$title - LON-CAPA " |
|
.&mt('Construction Space')."';</script>"; |
} |
} |
return $result; |
return $result; |
} |
} |
Line 1815 sub error {
|
Line 1841 sub error {
|
# If printing in construction space, put the error inside <pre></pre> |
# If printing in construction space, put the error inside <pre></pre> |
push(@Apache::lonxml::error_messages, |
push(@Apache::lonxml::error_messages, |
$Apache::lonxml::warnings_error_header. |
$Apache::lonxml::warnings_error_header. |
"<b>ERROR:</b>".join("<br />\n",@errors)."<br />\n"); |
"<b>".&mt('ERROR:')."</b>".join("<br />\n",@errors)."<br />\n"); |
$Apache::lonxml::warnings_error_header=''; |
$Apache::lonxml::warnings_error_header=''; |
} else { |
} else { |
my $errormsg; |
my $errormsg; |
Line 1825 sub error {
|
Line 1851 sub error {
|
$errormsg=&mt("An error occured while processing this resource. The author has been notified."); |
$errormsg=&mt("An error occured while processing this resource. The author has been notified."); |
} |
} |
my $host=$Apache::lonnet::perlvar{'lonHostID'}; |
my $host=$Apache::lonnet::perlvar{'lonHostID'}; |
push(@errors, "The error occurred on host <tt>$host</tt>"); |
push(@errors, |
|
&mt("The error occurred on host [_1]", |
|
"<tt>$host</tt>")); |
|
|
my $msg = join('<br />', @errors); |
my $msg = join('<br />', @errors); |
|
|