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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 16 Nov 2006 13:02:47 -0000


raeburn		Thu Nov 16 08:02:47 2006 EDT

  Modified files:              
    /loncom/interface	lonpickcourse.pm 
  Log:
  user.adv gets to pick from all courses.
  
  setroles form element needed in search form for portfolio access.
  
  
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.58 loncom/interface/lonpickcourse.pm:1.59
--- loncom/interface/lonpickcourse.pm:1.58	Tue Nov 14 13:27:57 2006
+++ loncom/interface/lonpickcourse.pm	Thu Nov 16 08:02:45 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.58 2006/11/14 18:27:57 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.59 2006/11/16 13:02:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -79,7 +79,7 @@
 
     my $onlyown = 0;
     # if called to assign course-based portfolio access control
-    if ((($env{'form.form'} eq 'portform') && ($env{'user.adv'}))) {
+    if ((($env{'form.form'} eq 'portform') && (!$env{'user.adv'}))) {
         $onlyown = 1;
     }
 
@@ -339,6 +339,9 @@
 $roleelement
 $multelement
 |;
+        if ($formname eq 'portform') {
+            $output .= '<input type="hidden" name="setroles" value="'.$env{'form.setroles'}.'" />';
+        }
     }
     if ($sincefilterform) { 
         $output .= $lt{'cac'}.': '.$sincefilterform.'<br />'."\n";