[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 05 Sep 2007 00:58:57 -0000
albertel Tue Sep 4 20:58:57 2007 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- style police
- eliminating use of lonnet::all_domains
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.379 loncom/interface/lonparmset.pm:1.380
--- loncom/interface/lonparmset.pm:1.379 Mon Sep 3 11:34:12 2007
+++ loncom/interface/lonparmset.pm Tue Sep 4 20:58:57 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.379 2007/09/03 15:34:12 raeburn Exp $
+# $Id: lonparmset.pm,v 1.380 2007/09/05 00:58:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3082,14 +3082,14 @@
user for whom cloning ability is to be changed in course.
=cut
-
+
##################################################
##################################################
sub extract_cloners {
my ($clonelist,$allowclone) = @_;
if ($clonelist =~ /,/) {
- @{$allowclone} = split/,/,$clonelist;
+ @{$allowclone} = split(/,/,$clonelist);
} else {
$$allowclone[0] = $clonelist;
}
@@ -3101,15 +3101,14 @@
my @allowclone = ();
&extract_cloners($$clonelist,\@allowclone);
foreach my $currclone (@allowclone) {
- if (!grep/^\Q$currclone\E$/,@$oldcloner) {
+ if (!grep(/^\Q$currclone\E$/,@$oldcloner)) {
if ($currclone eq '*') {
$clean_clonelist .= $currclone.',';
} else {
my ($uname,$udom) = split(/:/,$currclone);
if ($uname eq '*') {
if ($udom =~ /^$match_domain$/) {
- my @alldoms = &Apache::lonnet::all_domains();
- if (!grep(/^\Q$udom\E$/,@alldoms)) {
+ if (!&Apache::lonnet::domain($udom)) {
$disallowed{'domain'} .= $currclone.',';
} else {
$clean_clonelist .= $currclone.',';
@@ -3152,9 +3151,9 @@
my @allowclone;
&extract_cloners($clonelist,\@allowclone);
foreach my $currclone (@allowclone) {
- if (!grep/^$currclone$/,@$oldcloner) {
+ if (!grep(/^$currclone$/,@$oldcloner)) {
if ($currclone ne '*') {
- ($uname,$udom) = split/:/,$currclone;
+ ($uname,$udom) = split(/:/,$currclone);
if ($uname && $udom && $uname ne '*') {
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') {
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable');
@@ -3172,9 +3171,9 @@
}
}
foreach my $oldclone (@$oldcloner) {
- if (!grep/^$oldclone$/,@allowclone) {
+ if (!grep(/^\Q$oldclone\E$/,@allowclone)) {
if ($oldclone ne '*') {
- ($uname,$udom) = split/:/,$oldclone;
+ ($uname,$udom) = split(/:/,$oldclone);
if ($uname && $udom && $uname ne '*' ) {
if (&Apache::lonnet::homeserver($uname,$udom) ne 'no_host') {
my %currclonecrs = &Apache::lonnet::dump('environment',$udom,$uname,'cloneable');