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

www lon-capa-cvs@mail.lon-capa.org
Tue, 10 Feb 2004 22:15:53 -0000


www		Tue Feb 10 17:15:53 2004 EDT

  Modified files:              
    /loncom/interface	londropadd.pm 
  Log:
  Add course personnel to class list.
  
  
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.99 loncom/interface/londropadd.pm:1.100
--- loncom/interface/londropadd.pm:1.99	Thu Jan 15 14:27:05 2004
+++ loncom/interface/londropadd.pm	Tue Feb 10 17:15:53 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.99 2004/01/15 19:27:05 matthew Exp $
+# $Id: londropadd.pm,v 1.100 2004/02/10 22:15:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1111,6 +1111,24 @@
     }
     my $status_select = &Apache::lonhtmlcommon::StatusOptions
         ($ENV{'form.Status'},'studentform');
+    my $cid=$ENV{'request.course.id'};
+    my $cdom=$ENV{'course.'.$cid.'.domain'};
+    my $cnum=$ENV{'course.'.$cid.'.num'};
+# -------------------------------------------------------- Get course personnel
+    my %coursepersonnel=&Apache::lonnet::get_course_adv_roles($cdom.'/'.$cnum);
+    $r->print('<table border="2">');
+    foreach (sort keys %coursepersonnel) {
+	$r->print('<tr><td>'.$_.'</td><td>');
+        foreach (split(/\,/,$coursepersonnel{$_})) {
+	    my ($puname,$pudom)=split(/\:/,$_);
+	    $r->print(' '.&Apache::loncommon::aboutmewrapper(
+                          &Apache::loncommon::plainname($puname,
+                          $pudom),$puname,$pudom));
+	}
+        $r->print('</td></tr>');
+    }
+    $r->print('</table>');
+# --------------------------------------------------------------- Student roles
     my $CCL=&mt('Current Class List');
     $r->print(<<END);
 <input type="hidden" name="action" value="$ENV{'form.action'}" />
@@ -1135,7 +1153,6 @@
 END
     }
     $r->print($status_select."</p>\n");
-    my $cid=$ENV{'request.course.id'};
     my ($classlist,$keylist)=&Apache::loncoursedata::get_classlist();
     if (! defined($classlist)) {
         $r->print(&mt('There are no students currently enrolled.')."\n");