[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonparmset.pm
raeburn
raeburn at source.lon-capa.org
Thu Jun 27 14:22:41 EDT 2013
raeburn Thu Jun 27 18:22:41 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonparmset.pm
Log:
- For 2.11
- Backport 1.533, 1.534, 1.535.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.522.2.6 loncom/interface/lonparmset.pm:1.522.2.7
--- loncom/interface/lonparmset.pm:1.522.2.6 Thu May 23 14:26:43 2013
+++ loncom/interface/lonparmset.pm Thu Jun 27 18:22:41 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.522.2.6 2013/05/23 14:26:43 raeburn Exp $
+# $Id: lonparmset.pm,v 1.522.2.7 2013/06/27 18:22:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1082,6 +1082,10 @@
if ($which > 3) {
$nolink = 1;
}
+ } elsif ($mprefix =~ /examcode\&$/) {
+ unless ($which == 2) {
+ $nolink = 1;
+ }
}
if ($nolink) {
$r->print(&valout($$outpar[$which],$$typeoutpar[$which]));
@@ -1405,7 +1409,7 @@
'lenient' => 'grading',
'retrypartial' => 'tries',
'discussvote' => 'misc',
-
+ 'examcode' => 'high_level_randomization',
);
}
@@ -2162,16 +2166,22 @@
}
}
}
- } elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote)\&\d+$/) {
+ } elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote|examcode)\&\d+$/) {
$name = $1;
+ my $val = $values[$i];
+ if ($name eq 'examcode') {
+ if (&Apache::lonnet::validCODE($values[$i])) {
+ $val = 'valid';
+ }
+ }
$needsrelease =
- $Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"};
+ $Apache::lonnet::needsrelease{"parameter:$name:$val"};
if ($needsrelease) {
unless ($got_chostname) {
($chostname,$cmajor,$cminor) = ¶meter_release_vars();
$got_chostname = 1;
}
- $needsnewer = ¶meter_releasecheck($name,$values[$i],
+ $needsnewer = ¶meter_releasecheck($name,$val,
$needsrelease,
$chostname,
$cmajor,$cminor);
@@ -2819,6 +2829,8 @@
$name = 'lenient';
} elsif ($typeof eq 'string_discussvote') {
$name = 'discussvote';
+ } elsif ($typeof eq 'string_examcode') {
+ $name = 'examcode';
} elsif ($typeof eq 'string_yesno') {
if ($thiskey =~ /\.retrypartial$/) {
$name = 'retrypartial';
@@ -4643,9 +4655,12 @@
lenient => 'string_lenient',
retrypartial => 'string_yesno',
discussvote => 'string_discussvote',
+ examcode => 'string_examcode',
);
if (exists($stringtypes{$name})) {
- if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {
+ if ($name eq 'examcode') {
+ $desc = $value;
+ } elsif (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {
foreach my $possibilities (@{ $strings{$stringtypes{$name}} }) {
next unless (ref($possibilities) eq 'ARRAY');
my ($parmval, $description) = @{ $possibilities };
More information about the LON-CAPA-cvs
mailing list