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

matthew lon-capa-cvs@mail.lon-capa.org
Fri, 20 Feb 2004 19:44:59 -0000


matthew		Fri Feb 20 14:44:59 2004 EDT

  Modified files:              
    /loncom/interface	londropadd.pm 
  Log:
  Added breadcrumbs to 'action' state.
  
  
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.101 loncom/interface/londropadd.pm:1.102
--- loncom/interface/londropadd.pm:1.101	Wed Feb 11 10:30:36 2004
+++ loncom/interface/londropadd.pm	Fri Feb 20 14:44:59 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.101 2004/02/11 15:30:36 matthew Exp $
+# $Id: londropadd.pm,v 1.102 2004/02/20 19:44:59 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,9 +42,7 @@
 ###############################################################
 ###############################################################
 sub header {
-    my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager').
-	&Apache::loncommon::help_open_faq(9).
-	&Apache::loncommon::help_open_bug('Instructor Interface');
+    my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager');
     my $title = &mt('LON-CAPA Enrollment Manager');
     return(<<ENDHEAD);
 <html>
@@ -2104,6 +2102,12 @@
     }
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                             ['action','state']);
+
+    &Apache::lonhtmlcommon::clear_breadcrumbs();
+    &Apache::lonhtmlcommon::add_breadcrumb
+        ({href=>"/adm/dropadd",
+          text=>"Enrollment Manager",
+          faq=>9,bug=>'Instructor Interface',});
     #  Needs to be in a course
     if (! (($ENV{'request.course.fn'}) &&
           (&Apache::lonnet::allowed('cst',$ENV{'request.course.id'})))) {
@@ -2115,6 +2119,8 @@
     #
     # Only output the header information if they did not request csv format
     #
+    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+                                            ['state','action']);
     if (exists($ENV{'form.state'}) && ($ENV{'form.state'} eq 'csv')) {
         $r->content_type('text/csv');
     } else {
@@ -2126,8 +2132,16 @@
     #
     # Main switch on form.action and form.state, as appropriate
     if (! exists($ENV{'form.action'})) {
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Enrollment Manager'));
         &print_main_menu($r);
     } elsif ($ENV{'form.action'} eq 'upload') {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'/adm/dropadd?action=upload&state=',
+              text=>"Upload Classlist",
+              faq=>9,bug=>'Instructor Interface',});
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Upload Classlist'));
         if (! exists($ENV{'form.state'})) {
             &print_first_courselist_upload_form($r);            
         } elsif ($ENV{'form.state'} eq 'got_file') {
@@ -2142,6 +2156,12 @@
             &print_first_courselist_upload_form($r);            
         }
     } elsif ($ENV{'form.action'} eq 'drop') {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'/adm/dropadd?action=drop',
+              text=>"Drop Students",
+              faq=>9,bug=>'Instructor Interface',});
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Drop Students'));
         if (! exists($ENV{'form.state'})) {
             &print_drop_menu($r);
         } elsif ($ENV{'form.state'} eq 'done') {
@@ -2150,6 +2170,12 @@
             &print_drop_menu($r);
         }
     } elsif ($ENV{'form.action'} eq 'enrollstudent') {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'/adm/dropadd?action=enrollstudent',
+              text=>"Enroll Student",
+              faq=>9,bug=>'Instructor Interface',});
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Enroll Student'));
         if (! exists($ENV{'form.state'})) {
             &get_student_username_domain_form($r);
         } elsif ($ENV{'form.state'} eq 'gotusername') {
@@ -2160,6 +2186,12 @@
             &get_student_username_domain_form($r);
         }
     } elsif ($ENV{'form.action'} eq 'classlist') {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'/adm/dropadd?action=classlist',
+              text=>"View Classlist",
+              faq=>9,bug=>'Instructor Interface',});
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'View Classlist'));
         if (! exists($ENV{'form.state'})) {
             &print_html_classlist($r);
         } elsif ($ENV{'form.state'} eq 'csv') {
@@ -2170,6 +2202,12 @@
             &print_html_classlist($r);
         }
     } elsif ($ENV{'form.action'} eq 'modifystudent') {
+        &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>'/adm/dropadd?action=modifystudent',
+              text=>"Modify Student Data",
+              faq=>9,bug=>'Instructor Interface',});
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Modify Student Data'));
         if (! exists($ENV{'form.state'})) {
             &print_html_classlist($r);
         } elsif ($ENV{'form.state'} eq 'selected') {
@@ -2184,6 +2222,8 @@
         &Apache::lonnet::logthis("Undetermined state in londropadd.pm.  ".
                                  "form.action = ".$ENV{'form.action'}.
                                  "Someone should fix this.");
+        $r->print(&Apache::lonhtmlcommon::breadcrumbs
+                  (undef,'Enrollment Manager'));
         &print_main_menu($r);
     }
     #