[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /xml lonxml.pm
raeburn
raeburn at source.lon-capa.org
Wed Mar 11 09:10:57 EDT 2015
raeburn Wed Mar 11 13:10:57 2015 EDT
Modified files: (Branch: version_2_11_X)
/loncom/xml lonxml.pm
Log:
- For 2.11
Backport 1.550, 1.551, 1.552
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.531.2.17 loncom/xml/lonxml.pm:1.531.2.18
--- loncom/xml/lonxml.pm:1.531.2.17 Sun Jul 27 20:26:12 2014
+++ loncom/xml/lonxml.pm Wed Mar 11 13:10:56 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.531.2.17 2014/07/27 20:26:12 raeburn Exp $
+# $Id: lonxml.pm,v 1.531.2.18 2015/03/11 13:10:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -323,11 +323,11 @@
}
sub printalltags {
- my $temp;
- foreach $temp (sort keys %Apache::lonxml::alltags) {
- &Apache::lonxml::debug("$temp -- ".
- join(',',@{ $Apache::lonxml::alltags{$temp} }));
- }
+ my $temp;
+ foreach $temp (sort keys %Apache::lonxml::alltags) {
+ &Apache::lonxml::debug("$temp -- ".
+ join(',',@{ $Apache::lonxml::alltags{$temp} }));
+ }
}
sub xmlparse {
@@ -908,7 +908,10 @@
$safeeval->permit("require");
$safeinit .= ';$external::target="'.$target.'";';
&Apache::run::run($safeinit,$safeeval);
- &initialize_rndseed($safeeval);
+ my $rawrndseed = &initialize_rndseed($safeeval);
+ if ($target eq 'grade') {
+ $Apache::lonhomework::rawrndseed = $rawrndseed;
+ }
}
sub clean_safespace {
@@ -947,6 +950,7 @@
my $safeinit = '$external::randomseed="'.$rndseed.'";';
&Apache::lonxml::debug("Setting rndseed to $rndseed");
&Apache::run::run($safeinit,$safeeval);
+ return $rndseed;
}
sub default_homework_load {
@@ -1421,7 +1425,7 @@
if (!$exact) {
$res=&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$res);
}
- push(@Apache::lonxml::extlinks,$res)
+ push(@Apache::lonxml::extlinks,$res);
}
sub writeallows {
@@ -2148,7 +2152,7 @@
my $declutter=&Apache::lonnet::declutter($env{'request.filename'});
my $baseurl = &Apache::lonnet::clutter($declutter);
my @userlist;
- foreach (keys %users) {
+ foreach (keys(%users)) {
my ($user,$domain) = split(/:/, $_);
push(@userlist,"$user:$domain");
my $key=$declutter.'_'.$user.'_'.$domain;
More information about the LON-CAPA-cvs
mailing list