--- loncom/interface/lonparmset.pm 2006/11/20 21:04:44 1.347
+++ loncom/interface/lonparmset.pm 2006/12/05 02:55:53 1.350
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.347 2006/11/20 21:04:44 banghart Exp $
+# $Id: lonparmset.pm,v 1.350 2006/12/05 02:55:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -65,7 +65,7 @@ use Apache::lonlocal;
use Apache::lonnavmaps;
use Apache::longroup;
use Apache::lonrss;
-use LONCAPA;
+use LONCAPA qw(:DEFAULT :match);
# --- Caches local to lonparmset
@@ -2363,8 +2363,7 @@ sub readdata {
my $classlist=&Apache::loncoursedata::get_classlist();
foreach (keys %$classlist) {
- # the following undefs are for 'domain', and 'username' respectively.
- if ($_=~/^(\w+)\:(\w+)$/) {
+ if ($_=~/^($match_username)\:($match_domain)$/) {
my ($tuname,$tudom)=($1,$2);
my $useropt=&Apache::lonnet::get_userresdata($tuname,$tudom);
foreach my $userkey (keys %{$useropt}) {
@@ -2486,7 +2485,7 @@ sub storedata {
sub extractuser {
my $key=shift;
- return ($key=~/^$env{'request.course.id'}.\[useropt\:(\w+)\:(\w+)\]\./);
+ return ($key=~/^$env{'request.course.id'}.\[useropt\:($match_username)\:($match_domain)\]\./);
}
sub listdata {
@@ -2544,7 +2543,7 @@ sub listdata {
my $section=&mt('All Students');
if ($middle=~/^\[(.*)\]/) {
my $issection=$1;
- if ($issection=~/^useropt\:(\w+)\:(\w+)/) {
+ if ($issection=~/^useropt\:($match_username)\:($match_domain)/) {
$section=&mt('User').": ".&Apache::loncommon::plainname($1,$2);
} else {
$section=&mt('Group/Section').': '.$issection;
@@ -2918,7 +2917,7 @@ sub parse_key {
$data{'scope_type'} = 'all';
if ($middle=~/^\[(.*)\]/) {
$data{'scope'} = $1;
- if ($data{'scope'}=~/^useropt\:(\w+)\:(\w+)/) {
+ if ($data{'scope'}=~/^useropt\:($match_username)\:($match_domain)/) {
$data{'scope_type'} = 'user';
$data{'scope'} = [$1,$2];
} else {
@@ -3706,13 +3705,7 @@ sub parm_change_log {
\%saveable_parameters);
&Apache::loncommon::restore_course_settings('parameter_log',
\%saveable_parameters);
- if (!$env{'form.show'}) { $env{'form.show'}=10; }
-
- my $countselect =
- &Apache::lonmeta::selectbox('show',$env{'form.show'},undef,
- (&mt('all'),10,20,50,100,1000,10000));
-
- $r->print('