[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm lonparmset.pm

raeburn raeburn at source.lon-capa.org
Mon Sep 3 12:43:48 EDT 2018


raeburn		Mon Sep  3 16:43:48 2018 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm lonhelper.pm 
  Log:
  - Group separator in $env{'request.course.groups'} is : not , .
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.584 loncom/interface/lonparmset.pm:1.585
--- loncom/interface/lonparmset.pm:1.584	Mon Dec 18 23:13:53 2017
+++ loncom/interface/lonparmset.pm	Mon Sep  3 16:43:47 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.584 2017/12/18 23:13:53 raeburn Exp $
+# $Id: lonparmset.pm,v 1.585 2018/09/03 16:43:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2321,7 +2321,7 @@
     if (($pssymb) || &Apache::lonnet::allowed('mdg',$env{'request.course.id'})) {
         %grouphash = &Apache::longroup::coursegroups();
     } elsif ($env{'request.course.groups'} ne '') {
-        map { $grouphash{$_} = 1; } split(/,/,$env{'request.course.groups'});
+        map { $grouphash{$_} = 1; } split(/:/,$env{'request.course.groups'});
     }
 
     my $g_s_header='';
@@ -2665,7 +2665,7 @@
     if (&Apache::lonnet::allowed('mdg',$env{'request.course.id'})) {
         %grouphash = &Apache::longroup::coursegroups();
     } elsif ($env{'request.course.groups'} ne '') {
-         map { $grouphash{$_} = 1; } split(/,/,$env{'request.course.groups'});
+         map { $grouphash{$_} = 1; } split(/:/,$env{'request.course.groups'});
     }
     return '' if (!%grouphash);
 
@@ -2874,7 +2874,7 @@
     if ($cgroup ne '') {
         unless (&Apache::lonnet::allowed('mdg',$env{'request.course.id'})) {
             if (($env{'request.course.groups'} eq '') || 
-                (!grep(/^\Q$cgroup\E$/,split(/,/,$env{'request.course.groups'})))) {
+                (!grep(/^\Q$cgroup\E$/,split(/:/,$env{'request.course.groups'})))) {
                 $noeditgrp = 1;
             }
         }
@@ -4282,7 +4282,7 @@
         if (&Apache::lonnet::allowed('mdg',$env{'request.course.id'})) {
             %grouphash = &Apache::longroup::coursegroups();
         } elsif ($env{'request.course.groups'} ne '') {
-            map { $grouphash{$_} = 1; } split(/,/,$env{'request.course.groups'});
+            map { $grouphash{$_} = 1; } split(/:/,$env{'request.course.groups'});
         }
     }
 
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.201 loncom/interface/lonhelper.pm:1.202
--- loncom/interface/lonhelper.pm:1.201	Wed Aug 29 20:21:30 2018
+++ loncom/interface/lonhelper.pm	Mon Sep  3 16:43:47 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.201 2018/08/29 20:21:30 raeburn Exp $
+# $Id: lonhelper.pm,v 1.202 2018/09/03 16:43:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3327,7 +3327,7 @@
     if ((!$paramHash->{'grouponly'}) || (&Apache::lonnet::allowed('mdg',$Apache::lonnet::env{'request.course.id'}))) {
         %curr_groups = &Apache::longroup::coursegroups();
     } elsif ($Apache::lonnet::env{'request.course.groups'} ne '') {
-        map { $curr_groups{$_} = 1; } split(/,/,$Apache::lonnet::env{'request.course.groups'});
+        map { $curr_groups{$_} = 1; } split(/:/,$Apache::lonnet::env{'request.course.groups'});
     }
     foreach my $group_name (sort {lc($a) cmp lc($b)} (keys(%curr_groups))) {
 	push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]);




More information about the LON-CAPA-cvs mailing list