--- loncom/interface/lonparmset.pm 2006/10/16 10:45:24 1.344
+++ loncom/interface/lonparmset.pm 2006/12/11 23:57:17 1.351
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.344 2006/10/16 10:45:24 foxr Exp $
+# $Id: lonparmset.pm,v 1.351 2006/12/11 23:57:17 banghart 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 {
@@ -3197,21 +3196,47 @@ sub output_row {
$values = '';
}
if (!($options =~ /deleted/)) {
- $output.=''.$field_text.':';
- $output.=' ';
-
my @options= ( ['active', 'Show to student'],
- ['onlyone','Student may select only one choice'],
- ['stuadd', 'Student may type choices']);
+ ['stuadd', 'Provide text area for students to type catalog information'],
+ ['choices','Provide choices for students to select from']);
+# ['onlyone','Student may select only one choice']);
if ($added_flag) {
push @options,['deleted', 'Delete Metadata Field'];
}
+ $output = &Apache::loncommon::start_data_table_row();
+ $output .= '