--- loncom/interface/lonhelper.pm 2004/04/20 15:08:26 1.69
+++ loncom/interface/lonhelper.pm 2004/04/22 14:43:16 1.74
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.69 2004/04/20 15:08:26 sakharuk Exp $
+# $Id: lonhelper.pm,v 1.74 2004/04/22 14:43:16 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -263,8 +263,13 @@ sub real_handler {
# Send header, don't cache this page
-
- if (&Apache::lonhomework::setupheader($r)) { return OK; }
+ if ($ENV{'browser.mathml'}) {
+ &Apache::loncommon::content_type($r,'text/xml');
+ } else {
+ &Apache::loncommon::content_type($r,'text/html');
+ }
+ $r->send_http_header;
+ return OK if $r->header_only;
$r->rflush();
# Discard result, we just want the objects that get created by the
@@ -3121,7 +3126,7 @@ sub render {
# Print the granularity, depending on the action
if ($vars->{GRANULARITY} eq 'whole_course') {
- $resourceString .= '
for all resources in the course
';
+ $resourceString .= '
'.&mt('for').' '.&mt('all resources in the course').'
';
$level = 9; # general course, see lonparmset.pm perldoc
$affectedResourceId = "0.0";
$symb = 'a';
@@ -3152,12 +3157,19 @@ sub render {
$result .= '
'.&mt('Confirm that this information is correct, then click "Finish Helper" to complete setting the parameter.').'
';
# Print the type of manipulation:
- $result .= '
Setting the ' . $dateTypeHash{$vars->{ACTION_TYPE}} . '';
+ my $extra;
if ($vars->{ACTION_TYPE} eq 'tries') {
- $result .= ' to ' . $vars->{TRIES} . '';
+ $extra = $vars->{TRIES};
}
if ($vars->{ACTION_TYPE} eq 'weight') {
- $result .= ' to ' . $vars->{WEIGHT} . '';
+ $extra = $vars->{WEIGHT};
+ }
+ $result .= "
";
+ my $what = &mt($dateTypeHash{$vars->{ACTION_TYPE}});
+ if ($extra) {
+ $result .= &mt('Setting the [_1] to [_2]',"$what",$extra);
+ } else {
+ $result .= &mt('Setting the [_1]',"$what");
}
$result .= "
\n";
if ($vars->{ACTION_TYPE} eq 'due_date' ||
@@ -3188,10 +3200,10 @@ sub render {
# Print targets
if ($vars->{TARGETS} eq 'course') {
- $result .= '