[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

raeburn raeburn at source.lon-capa.org
Mon Dec 7 03:11:55 EST 2015


raeburn		Mon Dec  7 08:11:55 2015 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - Including inhibitmenu=yes in query string when displaying a .problem in
    Authoring Space suppresses display of "Problem Testing" block and recent
    paths drop-down.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.541 loncom/homework/structuretags.pm:1.542
--- loncom/homework/structuretags.pm:1.541	Thu Dec  3 20:40:27 2015
+++ loncom/homework/structuretags.pm	Mon Dec  7 08:11:55 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.541 2015/12/03 20:40:27 damieng Exp $
+# $Id: structuretags.pm,v 1.542 2015/12/07 08:11:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -523,23 +523,25 @@
     } elsif (!defined($found{'body'}) 
 	     && $env{'request.state'} eq 'construct') {
 	if ($target eq 'web' || $target eq 'edit') {
-        # Breadcrumbs for Authoring Space
-        &Apache::lonhtmlcommon::clear_breadcrumbs();
-        &Apache::lonhtmlcommon::add_breadcrumb({
-            'text'  => 'Authoring Space',
-            'href'  => &Apache::loncommon::authorspace($env{'request.uri'}),
-        });
-        # breadcrumbs (and tools) will be created 
-        # in start_page->bodytag->innerregister
+            unless ($env{'form.inhibitmenu'} eq 'yes') {
+                # Breadcrumbs for Authoring Space
+                &Apache::lonhtmlcommon::clear_breadcrumbs();
+                &Apache::lonhtmlcommon::add_breadcrumb({
+                    'text'  => 'Authoring Space',
+                    'href'  => &Apache::loncommon::authorspace($env{'request.uri'}),
+                });
+                # breadcrumbs (and tools) will be created 
+                # in start_page->bodytag->innerregister
 
 # FIXME Where are we?
-#        &Apache::lonhtmlcommon::add_breadcrumb({
-#            'text'  => 'Problem Editing', # 'Problem Testing'
-#            'href'  => '',
-#        });
-        $pageheader =&Apache::loncommon::head_subbox(
-                &Apache::loncommon::CSTR_pageheader());
-	}
+#                &Apache::lonhtmlcommon::add_breadcrumb({
+#                    'text'  => 'Problem Editing', # 'Problem Testing'
+#                    'href'  => '',
+#               });
+                $pageheader = &Apache::loncommon::head_subbox(
+                                 &Apache::loncommon::CSTR_pageheader());
+	    }
+        }
     } elsif (!defined($found{'body'})) {
 	my %add_entries;
 	my $background=&Apache::lonxml::get_param('background',$parstack,
@@ -1730,7 +1732,9 @@
 	      '<input type="hidden" name="submitted" value="yes" />';
 	    # create a page header and exit
 	    if ($env{'request.state'} eq "construct") {
-		$result.= &problem_web_to_edit_header($env{'form.rndseed'});
+                unless ($env{'form.inhibitmenu'} eq 'yes') {
+		    $result.= &problem_web_to_edit_header($env{'form.rndseed'});
+                }
                 if ($Apache::lonhomework::type eq 'practice') {
                     $result.= '<input type="submit" name="resetdata" '.
                               'value="'.&mt('New Problem Variation').'" />'.




More information about the LON-CAPA-cvs mailing list