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

bisitz bisitz@source.lon-capa.org
Tue, 09 Jun 2009 16:33:55 -0000


bisitz		Tue Jun  9 16:33:55 2009 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm structuretags.pm 
  Log:
  Added some breadcrumbs to Construction Space
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.311 loncom/homework/lonhomework.pm:1.312
--- loncom/homework/lonhomework.pm:1.311	Tue May 19 22:52:19 2009
+++ loncom/homework/lonhomework.pm	Tue Jun  9 16:33:55 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.311 2009/05/19 22:52:19 bisitz Exp $
+# $Id: lonhomework.pm,v 1.312 2009/06/09 16:33:55 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -688,9 +688,19 @@
 sub analyze_header {
     my ($request) = @_;
     my $js = &Apache::structuretags::setmode_javascript();
+
+    # Breadcrumbs
+    my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+                   'text' => 'Construction Space'},
+                  {'href' => '',
+                   'text' => 'Problem Testing'},
+                  {'href' => '',
+                   'text' => 'Analyzing a problem'}];
+
     my $result =
-        &Apache::loncommon::start_page('Analyzing a problem',$js)
-       .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
+        &Apache::loncommon::start_page('Analyzing a problem',
+                                       $js,
+                                       {'bread_crumbs' => $brcrum,})
        .&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader());
     $result .= 
@@ -916,6 +926,13 @@
 	my $only_body =  ($env{'environment.remote'} eq 'off')? 0 : 1;
 	my $dragmath_button = 
             &Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1);
+
+    # Breadcrumbs
+    my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+                   'text' => 'Construction Space'},
+                  {'href' => '',
+                   'text' => 'Problem Editing'}];
+
 	my $start_page = 
 	    &Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js,
 					   {'no_auto_mt_title' => 1,
@@ -923,10 +940,11 @@
 					    'add_entries'      => {
 						'onresize' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
 						'onload'   => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
-				    }});
+                                    },
+                                                'bread_crumbs' => $brcrum,
+});
 
     $result=$start_page
-           .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
            .&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader());
 	$result.=&renderpage($request,$file,['no_output_web'],1).
@@ -1140,12 +1158,16 @@
 	my $dest = &Apache::lonnet::filelocation("",$request->uri);
 	my $errormsg;
 	my $instructions;
+        my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+                       'text' => 'Construction Space'},
+                      {'href' => '',
+                       'text' => "Create New $extension"}];
 	my $start_page = 
-	    &Apache::loncommon::start_page("Create New $extension");
-
+            &Apache::loncommon::start_page("Create New $extension",
+                                           undef,
+                                           {'bread_crumbs' => $brcrum,});
 	$request->print(
         $start_page
-       .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
        .&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader())
        .'<h1>'.&mt("Creating a new $extension resource.")."</h1>
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.449 loncom/homework/structuretags.pm:1.450
--- loncom/homework/structuretags.pm:1.449	Tue Jun  9 12:56:27 2009
+++ loncom/homework/structuretags.pm	Tue Jun  9 16:33:55 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.449 2009/06/09 12:56:27 bisitz Exp $
+# $Id: structuretags.pm,v 1.450 2009/06/09 16:33:55 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -212,7 +212,18 @@
 	    if ($env{'environment.remote'} ne 'off') {
 		$body_args{'only_body'}  = 1;
 	    }
-        $pageheader = &Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
+        # Breadcrumbs for Construction Space
+        &Apache::lonhtmlcommon::clear_breadcrumbs();
+        &Apache::lonhtmlcommon::add_breadcrumb({
+            'text'  => 'Construction Space',
+            'href'  => &Apache::loncommon::authorspace(),
+        });
+# FIXME Where are we?
+#        &Apache::lonhtmlcommon::add_breadcrumb({
+#            'text'  => 'Problem Editing', # 'Problem Testing'
+#            'href'  => '',
+#        });
+        $pageheader = &Apache::lonhtmlcommon::breadcrumbs()
                      .&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader());
 	}