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

raeburn raeburn at source.lon-capa.org
Sat May 4 20:15:03 EDT 2013


raeburn		Sun May  5 00:15:03 2013 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - Provide inline "Functions" bar (with Exit Editing) when editing HTML file 
    uploaded as the syllabus, i.e., user supplied file, instead of template.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.411 loncom/interface/lonmenu.pm:1.412
--- loncom/interface/lonmenu.pm:1.411	Wed Apr 24 02:43:59 2013
+++ loncom/interface/lonmenu.pm	Sun May  5 00:15:02 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.411 2013/04/24 02:43:59 raeburn Exp $
+# $Id: lonmenu.pm,v 1.412 2013/05/05 00:15:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -514,6 +514,14 @@
                         &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
                 }
                 return $trail;
+            } elsif ($resurl =~ m{^\Q/uploaded$courseurl/portfolio/syllabus/}) {
+                &Apache::lonhtmlcommon::clear_breadcrumbs();
+                &prepare_functions('/public'.$courseurl."/syllabus",
+                                   $forcereg,$group,undef,undef,1);
+                $title = &mt('Syllabus File');
+                my ($trail) =
+                    &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
+                return $trail;
             }
             unless ($env{'request.state'} eq 'construct') {
                 &Apache::lonhtmlcommon::clear_breadcrumbs();
@@ -846,7 +854,9 @@
 #
 # This applies in course context
 #
-        if (($resurl eq "/public/$cdom/$cnum/syllabus") && ($perms{'mdc'})) {
+        if (($perms{'mdc'}) &&
+            (($resurl eq "/public/$cdom/$cnum/syllabus") ||
+            ($resurl =~ m{^/uploaded/$cdom/$cnum/portfolio/syllabus/}))) {
             $cfile = $resurl;
             $home = &Apache::lonnet::homeserver($cnum,$cdom);
             if ($env{'form.forceedit'}) {
@@ -983,6 +993,7 @@
         &Apache::lonhtmlcommon::add_breadcrumb_tool(
             'advtools', $funcs[61]);
     }
+    return;
 }
 
 # ================================================================== Raw Config




More information about the LON-CAPA-cvs mailing list