[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages edittoplevel.gif /interface loncommon.pm londocs.pm lonnavmaps.pm doc/loncapafiles loncapafiles.lpml

raeburn raeburn at source.lon-capa.org
Wed Dec 21 15:22:00 EST 2011


raeburn		Wed Dec 21 20:22:00 2011 EDT

  Added files:                 
    /loncom/html/res/adm/pages	edittoplevel.gif 

  Modified files:              
    /loncom/interface	lonnavmaps.pm londocs.pm loncommon.pm 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - Item included in "Tools" on Course Contents page for 'mdc' priv users to
    jump directly into Course Editor (at top level).  
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.474 loncom/interface/lonnavmaps.pm:1.475
--- loncom/interface/lonnavmaps.pm:1.474	Wed Dec 21 16:53:03 2011
+++ loncom/interface/lonnavmaps.pm	Wed Dec 21 20:21:49 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.474 2011/12/21 16:53:03 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.475 2011/12/21 20:21:49 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1503,6 +1503,16 @@
             }
 	}
 	$result.='</form>';
+        if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
+            my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+            my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+            if ($env{'course.'.$env{'request.course.id'}.'.url'} eq 
+                "uploaded/$cdom/$cnum/default.sequence") {
+                &add_linkitem($args->{'linkitems'},'edittoplevel',
+                              "javascript:gocmd('/adm/coursedocs','direct');",
+                              'Content Editor');
+            }
+        }
     }
 
     if ($args->{'caller'} eq 'navmapsdisplay') {
@@ -1855,7 +1865,7 @@
 sub show_linkitems_toolbar {
     my ($linkitems,$condition)=@_;
     my @linkorder = ('firsthomework','everything','uncompleted',
-                     'changefolder','clearbubbles');
+                     'changefolder','clearbubbles','edittoplevel');
     my $result .='<td align="left">'."\n". 
                  '<span class="LC_nobreak">'."\n".
                  '<ul id="LC_toolbar">';
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.467 loncom/interface/londocs.pm:1.468
--- loncom/interface/londocs.pm:1.467	Sun Dec  4 15:51:58 2011
+++ loncom/interface/londocs.pm	Wed Dec 21 20:21:49 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.467 2011/12/04 15:51:58 raeburn Exp $
+# $Id: londocs.pm,v 1.468 2011/12/21 20:21:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2876,9 +2876,16 @@
 # Do we directly jump somewhere?
 
    if ($env{'form.command'} eq 'direct') {
-       my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'});
-       if ($resurl=~/\.(sequence|page)$/) {
-           $mapurl=$resurl;
+       my ($mapurl,$id,$resurl);
+       if ($env{'form.symb'} eq '') {
+           $mapurl = $env{'course.'.$env{'request.course.id'}.'.url'};
+       } else {
+           ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'});
+           if ($resurl=~/\.(sequence|page)$/) {
+               $mapurl=$resurl;
+           } elsif ($resurl eq 'adm/navmaps') {
+               $mapurl=$env{'course.'.$env{'request.course.id'}.'.url'};
+           }
        }
        my $mapresobj;
        my $navmap = Apache::lonnavmaps::navmap->new();
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1042 loncom/interface/loncommon.pm:1.1043
--- loncom/interface/loncommon.pm:1.1042	Wed Dec 21 18:01:58 2011
+++ loncom/interface/loncommon.pm	Wed Dec 21 20:21:49 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1042 2011/12/21 18:01:58 www Exp $
+# $Id: loncommon.pm,v 1.1043 2011/12/21 20:21:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6563,6 +6563,10 @@
   background-image:url(/res/adm/pages/open-all-folders.gif);
 }
 
+a#LC_content_toolbar_edittoplevel {
+  background-image:url(/res/adm/pages/edittoplevel.gif);
+}
+
 ul#LC_toolbar li a:hover {
   background-position: bottom center;
 }
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.776 doc/loncapafiles/loncapafiles.lpml:1.777
--- doc/loncapafiles/loncapafiles.lpml:1.776	Fri Dec 16 19:09:32 2011
+++ doc/loncapafiles/loncapafiles.lpml	Wed Dec 21 20:21:55 2011
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.776 2011/12/16 19:09:32 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.777 2011/12/21 20:21:55 raeburn Exp $ -->
 
 <!--
 
@@ -7013,6 +7013,7 @@
 chat.gif;
 close-all-folders.gif;
 dempty.gif;
+edittoplevel.gif;
 empty.gif;
 feedback.gif;
 group.gif;




More information about the LON-CAPA-cvs mailing list