[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonpickcourse.pm lonpickstudent.pm /publisher lonrights.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 28 Mar 2003 01:53:55 -0000


www		Thu Mar 27 20:53:55 2003 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonpickcourse.pm lonpickstudent.pm 
    /loncom/publisher	lonrights.pm 
  Log:
  Bugfixes and enhancements on pickstudent and pickcourse.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.91 loncom/interface/loncommon.pm:1.92
--- loncom/interface/loncommon.pm:1.91	Thu Mar 27 15:56:30 2003
+++ loncom/interface/loncommon.pm	Thu Mar 27 20:53:55 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.91 2003/03/27 20:56:30 www Exp $
+# $Id: loncommon.pm,v 1.92 2003/03/28 01:53:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -346,7 +346,7 @@
         return '';
    }
     return "<a href='".'javascript:openstdbrowser("'.$form.'","'.$unameele.
-        '","'.$udomele.'");'."'>Select</a>";
+        '","'.$udomele.'");'."'>Select User</a>";
 }
 
 sub coursebrowser_javascript {
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.6 loncom/interface/lonpickcourse.pm:1.7
--- loncom/interface/lonpickcourse.pm:1.6	Thu Mar 27 15:56:30 2003
+++ loncom/interface/lonpickcourse.pm	Thu Mar 27 20:53:55 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.6 2003/03/27 20:56:30 www Exp $
+# $Id: lonpickcourse.pm,v 1.7 2003/03/28 01:53:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -83,7 +83,7 @@
     var slct=opener.document.$ENV{'form.form'}.$ENV{'form.cdomelement'};
     var i;
     for (i=0;i<slct.length;i++) {
-        if (slct[i]==cdom) { slct.selectedIndex=i; }
+        if (slct.options[i].value==cdom) { slct.selectedIndex=i; }
     }
     self.close();
 }
Index: loncom/interface/lonpickstudent.pm
diff -u loncom/interface/lonpickstudent.pm:1.3 loncom/interface/lonpickstudent.pm:1.4
--- loncom/interface/lonpickstudent.pm:1.3	Mon Jan  6 08:53:26 2003
+++ loncom/interface/lonpickstudent.pm	Thu Mar 27 20:53:55 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a student from the classlist
 #
-# $Id: lonpickstudent.pm,v 1.3 2003/01/06 13:53:26 www Exp $
+# $Id: lonpickstudent.pm,v 1.4 2003/03/28 01:53:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -79,7 +79,7 @@
     var slct=opener.document.$ENV{'form.form'}.$ENV{'form.udomelement'};
     var i;
     for (i=0;i<slct.length;i++) {
-        if (slct[i]==udom) { slct.selectedIndex=i; }
+        if (slct.options[i].value==udom) { slct.selectedIndex=i; }
     }
     self.close();
 }
@@ -87,11 +87,28 @@
 ENDSCRIPT
     
     $r->print('<h3>'.$ENV{'course.'.$ENV{'request.course.id'}.'.description'}.
-              '</h3>');
+              '</h3><form>');
+# -------------------------------------------------------- Get course personnel
+    my %coursepersonnel=
+       &Apache::lonnet::get_course_adv_roles();
+    $r->print('<table border="2">');
+    foreach my $role (keys %coursepersonnel) {
+       foreach (split(/\,/,$coursepersonnel{$role})) {
+	   my ($puname,$pudom)=split(/\:/,$_);
+	   $r->print('<tr><td>'.
+             '<input type="button" value="Select" onClick="gochoose('.
+             "'".$puname."','".$pudom."')".'" /></td><td>'.$role.'</td><td>'.
+		     &Apache::loncommon::aboutmewrapper(
+                          &Apache::loncommon::plainname($puname,
+                          $pudom),$puname,$pudom).'</td></tr>');
+	}
+    }
+    $r->print('</table><p>&nbsp;');
     if ($filter ne '.') {
-       $r->print('Name starting with "'.$filter.'"<br />');
+       $r->print('<br/ >Name starting with "'.$filter.'"<br />');
     }
-    $r->print('<form><table>');  
+    $r->print('</p><table>');
+  # ------------------------------------------------------------------ Students
     foreach (sort keys %$classlist) {
         # the following undefs are for 'domain', and 'username' respectively.
 	my (undef,undef,$end,$start,$id,$section,$fullname,$status)=
Index: loncom/publisher/lonrights.pm
diff -u loncom/publisher/lonrights.pm:1.8 loncom/publisher/lonrights.pm:1.9
--- loncom/publisher/lonrights.pm:1.8	Thu Mar 27 15:56:30 2003
+++ loncom/publisher/lonrights.pm	Thu Mar 27 20:53:55 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to show and edit custom distribution rights
 #
-# $Id: lonrights.pm,v 1.8 2003/03/27 20:56:30 www Exp $
+# $Id: lonrights.pm,v 1.9 2003/03/28 01:53:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -246,7 +246,7 @@
               $r->print($rcourse);
           }
 
-          $r->print('</td><td rowspan="2">');
+          $r->print('</td><td>');
 # realm section
           if ($constructmode) {
              $r->print('<input input type="text" size="5" name="section_'.
@@ -270,7 +270,7 @@
               $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));
           }
 # course selection link
-          $r->print('</td></tr><tr><td colspan="2" align="right">');
+          $r->print('</td></tr><tr><td colspan="3" align="right">');
           if ($rcourse) {
 	      my %descript=
                  &Apache::lonnet::coursedescription($rdom.'_'.$rcourse);