[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm

raeburn raeburn at source.lon-capa.org
Fri Jun 20 14:00:52 EDT 2014


raeburn		Fri Jun 20 18:00:52 2014 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  - Detect if Authoring Spaces have not been moved following upgrade from 2.10
    (and older) to 2.11, and display an appropriate message.
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.154 loncom/publisher/lonpubdir.pm:1.155
--- loncom/publisher/lonpubdir.pm:1.154	Sat May 31 13:55:17 2014
+++ loncom/publisher/lonpubdir.pm	Fri Jun 20 18:00:51 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Authoring Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.154 2014/05/31 13:55:17 raeburn Exp $
+# $Id: lonpubdir.pm,v 1.155 2014/06/20 18:00:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,6 +60,25 @@
     my $thisdisfn=$fn;
 
     my $docroot=$r->dir_config('lonDocRoot');     # Apache  londocument root.
+    if ($thisdisfn eq "$docroot/priv/$udom") {
+        if ((-d "/home/$uname/public_html/") && (!-e "$docroot/priv/$udom/$uname")) {
+            my ($version) = ($r->dir_config('lonVersion') =~ /^\'?(\d+\.\d+)\./);
+            &Apache::loncommon::content_type($r,'text/html');
+            $r->send_http_header;
+
+            &Apache::lonhtmlcommon::clear_breadcrumbs();
+            $r->print(&Apache::loncommon::start_page('Authoring Space').
+                      '<div class="LC_error">'.
+                      '<br /><p>'.
+                      &mt('Your Authoring Space is currently in the location used by LON-CAPA version 2.10 and older, but your domain is using a newer LON-CAPA version ([_1]).',$version).'</p>'.
+                      '<p>'.
+                      &mt('Please ask your Domain Coordinator to move your Authoring Space to the new location.').
+                      '</p>'.
+                      '</div>'.
+                      &Apache::loncommon::end_page());
+            return OK;
+        }
+    }
     $thisdisfn=~s/^\Q$docroot\E\/priv//;
     
     my $resdir=$docroot.'/res'.$thisdisfn; # Resource directory




More information about the LON-CAPA-cvs mailing list