--- loncom/interface/lonparmset.pm 2006/05/09 14:38:10 1.299
+++ loncom/interface/lonparmset.pm 2006/07/03 12:59:58 1.319
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.299 2006/05/09 14:38:10 albertel Exp $
+# $Id: lonparmset.pm,v 1.319 2006/07/03 12:59:58 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -63,6 +63,9 @@ use Apache::lonhomework;
use Apache::lonxml;
use Apache::lonlocal;
use Apache::lonnavmaps;
+use Apache::longroup;
+use Apache::lonrss;
+use LONCAPA;
# --- Caches local to lonparmset
@@ -90,11 +93,11 @@ Inputs: $what - a parameter spec (inclu
Returns: A list, the first item is the index into the remaining list of items of parm valuse that is the active one, the list consists of parm values at the 14 possible levels
-14 - General Course
-13 - Map or Folder level in course
+14- General Course
+13- Map or Folder level in course
12- resource default
11- map default
-10 - resource level in course
+10- resource level in course
9 - General for section
8 - Map or Folder level for section
7 - resource level in section
@@ -125,6 +128,7 @@ sub parmval_by_symb {
my @outpar=();
# ----------------------------------------------------- Cascading lookup scheme
my $map=(&Apache::lonnet::decode_symb($symb))[0];
+ $map = &Apache::lonnet::deversion($map);
my $symbparm=$symb.'.'.$what;
my $mapparm=$map.'___(all).'.$what;
@@ -403,6 +407,8 @@ sub storeparm_by_symb_inner {
# ---------------------------------------------------------- Construct prefixes
$spnam=~s/\_([^\_]+)$/\.$1/;
my $map=(&Apache::lonnet::decode_symb($symb))[0];
+ $map = &Apache::lonnet::deversion($map);
+
my $symbparm=$symb.'.'.$spnam;
my $mapparm=$map.'___(all).'.$spnam;
@@ -488,7 +494,7 @@ sub storeparm_by_symb_inner {
}
if ($reply=~/^error\:(.*)/) {
- return "Write Error: $1";
+ return "Write Error: $1";
}
return '';
}
@@ -696,7 +702,7 @@ sub print_row {
}
my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers');
if ($automatic) {
- $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'';
+ $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'';
}
$r->print('
'); $cnt++; if ($cnt==3) { $r->print(" | |
+ | |
Select All Select Common Only | @@ -1117,16 +1123,13 @@ sub usermenu { 'oi' => "or ID", 'ad' => "at Domain" ); - my %sectionhash=(); my $sections=''; - my $numsec = &Apache::loncommon::get_sections( - $env{'course.'.$env{'request.course.id'}.'.domain'}, - $env{'course.'.$env{'request.course.id'}.'.num'}, - \%sectionhash); + my %sectionhash = &Apache::loncommon::get_sections(); + my $groups; - my %grouphash = &Apache::loncommon::coursegroups(); + my %grouphash = &Apache::longroup::coursegroups(); - if ($numsec > 0) { + if (%sectionhash) { $sections=$lt{'se'}.': |