[LON-CAPA-cvs] cvs: loncom /interface londocs.pm lonmenu.pm
www
www at source.lon-capa.org
Sun Nov 27 15:55:58 EST 2011
www Sun Nov 27 20:55:58 2011 EDT
Modified files:
/loncom/interface londocs.pm lonmenu.pm
Log:
Jump directly into content editor at right location
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.463 loncom/interface/londocs.pm:1.464
--- loncom/interface/londocs.pm:1.463 Mon Nov 7 20:05:55 2011
+++ loncom/interface/londocs.pm Sun Nov 27 20:55:58 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.463 2011/11/07 20:05:55 www Exp $
+# $Id: londocs.pm,v 1.464 2011/11/27 20:55:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2872,12 +2872,24 @@
my $containertag;
my $uploadtag;
+# Do we directly jump somewhere?
+ if ($env{'form.command'} eq 'direct') {
+ (my $mapurl) = &Apache::lonnet::decode_symb($env{'form.symb'});
+ my $maptitle = &Apache::lonnet::gettitle($mapurl);
+ $mapurl=~s{^.*/([^/]+)\.\w+$}{$1};
+ $env{'form.folderpath'}=
+ 'default&'.&Apache::lonhtmlcommon::entity_encode('Main Course Documents').
+ '&default&...::::&'.
+ &Apache::lonhtmlcommon::entity_encode($mapurl).'&'.
+ &Apache::lonhtmlcommon::entity_encode($maptitle).'::::';
+ }
+
# Where do we store these for when we come back?
my $stored_folderpath='docs_folderpath';
if ($supplementalflag) {
$stored_folderpath='docs_sup_folderpath';
}
-
+
# No folderpath, no pagepath, see if we have something stored
if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) {
&Apache::loncommon::restore_course_settings($stored_folderpath,
@@ -2916,6 +2928,9 @@
{'pagepath' => 'scalar',
'folderpath' => 'scalar'});
+ &Apache::lonnet::logthis("Folder: ".$env{'form.folderpath'});
+
+
if ($env{'form.folderpath'}) {
my (@folderpath)=split('&',$env{'form.folderpath'});
$env{'form.foldername'}=&unescape(pop(@folderpath));
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.361 loncom/interface/lonmenu.pm:1.362
--- loncom/interface/lonmenu.pm:1.361 Thu Nov 10 21:15:55 2011
+++ loncom/interface/lonmenu.pm Sun Nov 27 20:55:58 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.361 2011/11/10 21:15:55 raeburn Exp $
+# $Id: lonmenu.pm,v 1.362 2011/11/27 20:55:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -428,6 +428,12 @@
"gocmd('/adm/parmset','set')",
'Content Settings');
}
+ if ($env{'request.symb'} ne '' &&
+ &Apache::lonnet::allowed('mdc',$crs)) {
+ $hwkadd.=&switch('','',7,4,'docs.png','Folder/Page Content','parms[_2]',
+ "gocmd('/adm/coursedocs','direct')",
+ 'Folder/Page Content');
+ }
# -- End Homework
###
### Determine whether or not to display the 'cstr' button for this
@@ -709,7 +715,7 @@
unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) {
&Apache::lonhtmlcommon::add_breadcrumb_tool(
- 'advtools', @inlineremote[61,71,72,73,92]);
+ 'advtools', @inlineremote[61,71,72,73,74,92]);
}
}
}
More information about the LON-CAPA-cvs
mailing list