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

raeburn raeburn at source.lon-capa.org
Thu Jul 7 23:05:18 EDT 2022


raeburn		Fri Jul  8 03:05:18 2022 EDT

  Modified files:              
    /loncom/interface	lontiny.pm 
  Log:
  - Bug 6400. Role selection from active roles only.
  
  
Index: loncom/interface/lontiny.pm
diff -u loncom/interface/lontiny.pm:1.15 loncom/interface/lontiny.pm:1.16
--- loncom/interface/lontiny.pm:1.15	Sat Jul  2 19:55:15 2022
+++ loncom/interface/lontiny.pm	Fri Jul  8 03:05:18 2022
@@ -2,7 +2,7 @@
 # Extract domain, courseID, and symb from a shortened URL,
 # and switch role to a role in designated course.
 #
-# $Id: lontiny.pm,v 1.15 2022/07/02 19:55:15 raeburn Exp $
+# $Id: lontiny.pm,v 1.16 2022/07/08 03:05:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -250,7 +250,7 @@
                                         $destination .= '&ttoken='.$env{'form.ttoken'};
                                     }
                                     &do_redirect($r,$destination,$linkprot);
-                                } elsif (keys(%possroles) > 1) {
+                                } elsif (@allposs > 1) {
                                     if (grep(/^(cc|co)$/, at allposs)) {
                                         my $newrole;
                                         if (exists($possroles{'cc'})) {
@@ -270,7 +270,7 @@
                                         if (grep(/^cr\//, at allposs)) {
                                             $hascustom = 1;
                                         }
-                                        &show_roles($r,\%crsenv,\%possroles,$hassection,$hascustom);
+                                        &show_roles($r,\%crsenv,\%active,$hassection,$hascustom);
                                     }
                                 }
                                 return OK;




More information about the LON-CAPA-cvs mailing list