[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
raeburn
raeburn@source.lon-capa.org
Fri, 24 Dec 2010 16:48:46 -0000
raeburn Fri Dec 24 16:48:46 2010 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- Add &standard_string_options() routine to
retrieve arrays from %strings hash of arrays for string_* parameter types.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.504 loncom/interface/lonparmset.pm:1.505
--- loncom/interface/lonparmset.pm:1.504 Tue Dec 21 14:14:55 2010
+++ loncom/interface/lonparmset.pm Fri Dec 24 16:48:46 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.504 2010/12/21 14:14:55 raeburn Exp $
+# $Id: lonparmset.pm,v 1.505 2010/12/24 16:48:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2123,7 +2123,7 @@
my ($got_chostname,$chostname,$cmajor,$cminor);
my $totalstored = 0;
for (my $i=0;$i<=$#markers;$i++) {
- my ($needsrelease,$needsnewer);
+ my ($needsrelease,$needsnewer);
if ($markers[$i] =~ /^[\d.]+\&0_availablestudent\&(1|2|3)$/) {
my (@ok_slots,@fail_slots,@del_slots);
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom);
@@ -2158,7 +2158,7 @@
$needsrelease =
$Apache::lonnet::needsrelease{'parameter:type:'.$values[$i]};
if ($needsrelease) {
- unless ($got_chostname) {
+ unless ($got_chostname) {
($chostname,$cmajor,$cminor) = &questiontype_release_vars();
$got_chostname = 1;
}
@@ -3123,6 +3123,13 @@
[ 'surveycred', 'Survey (credit for submission)']],
);
+sub standard_string_options {
+ my ($string_type) = @_;
+ if (ref($strings{$string_type}) eq 'ARRAY') {
+ return $strings{$string_type};
+ }
+ return;
+}
sub string_selector {
my ($thistype, $thiskey, $showval) = @_;