--- loncom/interface/lonhelper.pm 2005/04/11 18:19:23 1.103
+++ loncom/interface/lonhelper.pm 2005/07/07 04:19:20 1.107
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.103 2005/04/11 18:19:23 albertel Exp $
+# $Id: lonhelper.pm,v 1.107 2005/07/07 04:19:20 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3268,6 +3268,11 @@ sub render {
'answer_date' => "0_answerdate",
'tries' => '0_maxtries',
'weight' => '0_weight' );
+ my %realParmName = ('open_date' => "opendate",
+ 'due_date' => "duedate",
+ 'answer_date' => "answerdate",
+ 'tries' => 'maxtries',
+ 'weight' => 'weight' );
my $affectedResourceId = "";
my $parm_name = $parmTypeHash{$vars->{ACTION_TYPE}};
@@ -3279,7 +3284,13 @@ sub render {
# Print the granularity, depending on the action
if ($vars->{GRANULARITY} eq 'whole_course') {
$resourceString .= '
'.&mt('for all resources in the course').'';
- $level = 9; # general course, see lonparmset.pm perldoc
+ if ($vars->{TARGETS} eq 'course') {
+ $level = 11; # general course, see lonparmset.pm perldoc
+ } elsif ($vars->{TARGETS} eq 'section') {
+ $level = 6;
+ } else {
+ $level = 3;
+ }
$affectedResourceId = "0.0";
$symb = 'a';
$paramlevel = 'general';
@@ -3289,7 +3300,13 @@ sub render {
my $title = $res->compTitle();
$symb = $res->symb();
$resourceString .= ''.&mt('for the map named [_1]',"$title").'';
- $level = 8;
+ if ($vars->{TARGETS} eq 'course') {
+ $level = 10; # general course, see lonparmset.pm perldoc
+ } elsif ($vars->{TARGETS} eq 'section') {
+ $level = 5;
+ } else {
+ $level = 2;
+ }
$affectedResourceId = $vars->{RESOURCE_ID};
$paramlevel = 'map';
} else {
@@ -3300,22 +3317,31 @@ sub render {
$symb = $res->symb();
my $title = $res->compTitle();
$resourceString .= ''.&mt('for the resource named [_1] part [_2]',"$title","$part").'';
- $level = 7;
+ if ($vars->{TARGETS} eq 'course') {
+ $level = 7; # general course, see lonparmset.pm perldoc
+ } elsif ($vars->{TARGETS} eq 'section') {
+ $level = 4;
+ } else {
+ $level = 1;
+ }
$affectedResourceId = $vars->{RESOURCE_ID};
$paramlevel = 'full';
}
- my $result = "