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

raeburn raeburn@source.lon-capa.org
Sat, 15 Aug 2009 14:01:05 -0000


raeburn		Sat Aug 15 14:01:05 2009 EDT

  Modified files:              
    /loncom/interface	loncreatecourse.pm 
  Log:
  - Add link to display course requests queued, pending approval by a Domain Coordinator.
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.124 loncom/interface/loncreatecourse.pm:1.125
--- loncom/interface/loncreatecourse.pm:1.124	Fri Jul 31 02:24:30 2009
+++ loncom/interface/loncreatecourse.pm	Sat Aug 15 14:01:04 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.124 2009/07/31 02:24:30 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.125 2009/08/15 14:01:04 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -816,6 +816,11 @@
     &mt('Upload an attributes file containing specifications for one or more courses or communities in XML format.'),
                      help => 'Batch_Creation',
                  },
+                   { internal_name => 'requestdisplay',
+                     name => &mt('Approve or reject course requests'),
+                     short_description =>
+    &mt('Display course creation requests submitted by authorized users held pending approval by a Domain Coordinator.'),
+                   },
     );
     my $options;
     foreach my $choice (@choices) {
@@ -952,6 +957,31 @@
                    text=>"Creation Outcome",
                    faq=>9,bug=>'Dom Coord Interface',});
            &process_batchfile($r);
+       } elsif ($env{'form.phase'} eq 'requestdisplay') {
+           &Apache::lonhtmlcommon::add_breadcrumb
+                 ({href=>"/adm/createcourse?phase=$env{'form.phase'}",
+                   text=>&mt('[_1] Display Request Queue',),
+                   faq=>9,bug=>'Dom Coord Interface',});
+           my $start_page=&Apache::loncommon::start_page('Display Requests');
+           my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Display Requests','Course_Request',undef,'Course_Request');
+           $r->print($start_page.$crumbs."\n".'<div>'.
+                     &Apache::loncoursequeueadmin::display_queued_requests(
+                         'domain',$env{'request.role.domain'}).'</div>'.
+                     &Apache::loncommon::end_page());
+       } elsif ($env{'form.phase'} eq 'requestchange') {
+           &Apache::lonhtmlcommon::add_breadcrumb
+                 ({href=>"/adm/createcourse?phase=requestdisplay",
+                   text=>&mt('[_1] Display Request Queue',),
+                   faq=>9,bug=>'Dom Coord Interface',},
+                 {href=>"/adm/createcourse?phase=requestchange",
+                   text=>&mt('[_1] Requests Updated',),
+                   faq=>9,bug=>'Dom Coord Interface',},);
+           my $start_page=&Apache::loncommon::start_page('Update Requests Result');
+           my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Requests Updated','Course_Request',undef,'Course_Request');
+           $r->print($start_page.$crumbs."\n".'<div>'.
+                     &Apache::loncoursequeueadmin::update_request_queue(
+                     'domain',$env{'request.role.domain'}).'</div>'.
+                     &Apache::loncommon::end_page());
        } else {
            &print_intro_page($r);
        }