[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Tue, 30 Aug 2005 00:40:15 -0000
banghart Mon Aug 29 20:40:15 2005 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
Entry form for instructor metadata may be ready.
But at this point, the user's entry goes nowhere.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.244 loncom/interface/lonparmset.pm:1.245
--- loncom/interface/lonparmset.pm:1.244 Mon Aug 29 18:57:09 2005
+++ loncom/interface/lonparmset.pm Mon Aug 29 20:40:12 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.244 2005/08/29 22:57:09 banghart Exp $
+# $Id: lonparmset.pm,v 1.245 2005/08/30 00:40:12 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2729,6 +2729,7 @@
my ($r)=@_;
my $next_meta;
my $output;
+ my $item_num;
if ($env{'form.serial'}) {
$next_meta = $env{'form.serial'};
} else {
@@ -2782,18 +2783,21 @@
foreach my $key (sort keys %env) {
if ($key=~m/^course\.$env{'request.course.id'}\.metadata\.\d+\.title$/) {
$key=~m/^course\.$env{'request.course.id'}\.metadata\.(\d+)\.title/;
-
+ $item_num = $1;
if ($1 ge $next_meta) {
$next_meta = $1 + 1;
}
$output.='<tr><td>'.$env{$key}.'</td>';
- $output.='<td>Select one: <input type="radio" name="type" value="one" /><br />';
- $output.='Select many: <input type="radio" name="type" value="many" /></td>';
- $output.='<td><input type="text" value="'.$env{$key.'.values'}.'" /></td></tr>';
+ $output.='<td>Select one: <input type="radio" name="type'.$item_num.'" value="one" /><br />';
+ $output.='Select many: <input type="radio" name="type'.$item_num.'" value="many" /></td>';
+ $output.='<td><input name="values'.$item_num.'" type="text" value="'.$env{$key.'.values'}.'" /></td></tr>';
}
}
$output.='<tr><td><i>Create new instructor metadata item</i><br />';
- $output.='<input type="text" name="instmeta" /></td><td>Options here</td>';
+ $output.='<input type="text" name="newitem" /></td>';
+ $output.='<td>Select one: <input type="radio" name="typenew" value="one" /><br />';
+ $output.='Select many: <input type="radio" name="typenew" value="many" /></td>';
+ $output.='<td><input name="valuesnew" type="text" value="" /></td></tr>';
$output.='<td><input type="hidden" name="serial" value="'.$next_meta.'" /></td></tr>';
$r->print(<<ENDenv);
<form method="post" action="/adm/parmset?action=setinstmeta" name="form">