[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncoursequeueadmin.pm

raeburn raeburn@source.lon-capa.org
Wed, 08 Dec 2010 03:49:34 -0000


raeburn		Wed Dec  8 03:49:34 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	loncoursequeueadmin.pm 
  Log:
  - Customization for GCI_3.
    - Backport 1.25.
  
  
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.12.2.11 loncom/interface/loncoursequeueadmin.pm:1.12.2.12
--- loncom/interface/loncoursequeueadmin.pm:1.12.2.11	Tue Dec  7 04:19:59 2010
+++ loncom/interface/loncoursequeueadmin.pm	Wed Dec  8 03:49:34 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Utilities to administer domain course requests and course self-enroll requests 
 #
-# $Id: loncoursequeueadmin.pm,v 1.12.2.11 2010/12/07 04:19:59 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.12.2.12 2010/12/08 03:49:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -376,7 +376,7 @@
         @processing_errors,@warn_approves,@warn_rejects,@approvals,
         @rejections,@rejectionerrors,@nopermissions,%courseroles,
         %communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype,
-        @warn_coursereqs);
+        @warn_coursereqs,$firsturl);
     @approvals = &Apache::loncommon::get_env_multiple('form.approvereq');
     @rejections = &Apache::loncommon::get_env_multiple('form.rejectreq');
     $now = time;
@@ -390,6 +390,12 @@
         $hostname = &Apache::lonnet::hostname($chome);
         $protocol = $Apache::lonnet::protocol{$chome};
         $protocol = 'http' if ($protocol ne 'https');
+        my %domdefaults = &Apache::lonnet::get_domain_defaults($cdom);
+        if ($domdefaults{'portal_def'}) {
+            $firsturl = $domdefaults{'portal_def'};
+        } else {
+            $firsturl = $protocol.'://'.$hostname;
+        }
         %requesthash = &Apache::lonnet::dump($namespace,$cdom,$cnum);
         $access_start =  $env{'course.'.$cid.'.internal.selfenroll_start_access'};
         $access_end =  $env{'course.'.$cid.'.internal.selfenroll_end_access'};
@@ -402,7 +408,7 @@
                         },
                         {
                             mt   => 'Visit [_1], to log-in and access the course',
-                            args => [$protocol.'://'.$hostname],
+                            args => [$firsturl],
                         }];
         $rejectedmsg =  [{
                             mt => 'Your request for enrollment has not been approved.',
@@ -416,6 +422,12 @@
         $hostname = &Apache::lonnet::hostname($chome);
         $protocol = $Apache::lonnet::protocol{$chome};
         $protocol = 'http' if ($protocol ne 'https');
+        my %domdefaults = &Apache::lonnet::get_domain_defaults($cdom);
+        if ($domdefaults{'portal_def'}) {
+            $firsturl = $domdefaults{'portal_def'};
+        } else {
+            $firsturl = $protocol.'://'.$hostname;
+        }
         my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$cdom);
         if (ref($domconfig{'requestcourses'}) eq 'HASH') {
             if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { 
@@ -428,7 +440,7 @@
                         },
                         {
                             mt   => 'Visit [_1], to log-in and access the course',
-                            args => [$protocol.'://'.$hostname],
+                            args => [$firsturl],
                         }];
         $rejectionmsg{'course'} =
                         [{
@@ -441,7 +453,7 @@
                         },
                         {
                             mt   => 'Visit [_1], to log-in and access the community',
-                            args => [$protocol.'://'.$hostname],
+                            args => [$firsturl],
                         }];
 
         $rejectionmsg{'community'} =