[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonnavdisplay.pm

raeburn raeburn@source.lon-capa.org
Mon, 04 Oct 2010 21:46:33 -0000


raeburn		Mon Oct  4 21:46:33 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	lonnavdisplay.pm 
  Log:
  - Customization for GCI_3
    - Corrections to backport of 1.17 in 1.13.6.1.
  
  
Index: loncom/interface/lonnavdisplay.pm
diff -u loncom/interface/lonnavdisplay.pm:1.13.6.1 loncom/interface/lonnavdisplay.pm:1.13.6.2
--- loncom/interface/lonnavdisplay.pm:1.13.6.1	Mon Oct  4 21:27:20 2010
+++ loncom/interface/lonnavdisplay.pm	Mon Oct  4 21:46:32 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavdisplay.pm,v 1.13.6.1 2010/10/04 21:27:20 raeburn Exp $
+# $Id: lonnavdisplay.pm,v 1.13.6.2 2010/10/04 21:46:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -155,7 +155,7 @@
 
     # Header
     my $course_type = &Apache::loncommon::course_type();
-    my ($title,$breadcrumb_text);
+    my ($title,$breadcrumb_text,$start_page,$args);
     if ($course_type eq 'Community') {
         $title = 'Community Contents';
         $breadcrumb_text = &mt('Community Contents');
@@ -176,7 +176,8 @@
                  'only_body'    => $body_only};
         $start_page = &Apache::loncommon::start_page($title,$js,$args);
     }
-    $r->print('<script type="text/javascript">window.focus();</script>');
+    $r->print($start_page.
+              '<script type="text/javascript">window.focus();</script>');
      
     $r->rflush();
 
@@ -309,9 +310,12 @@
         $env{'form.condition'} = 1;
 	$resource_no_folder_link = 1;
     } else {
+        my $link = 'navmaps?sort='.$env{'form.sort'}.'&amp;showOnlyHomework=1';
+        if ($env{'form.register'}) {
+            $link .= '&amp;register='.$env{'form.register'};
+        }
 	&Apache::lonnavmaps::add_linkitem(\%toplinkitems,'uncompleted',
-					  'location.href="navmaps?sort='.$env{'form.sort'}.
-					  '&showOnlyHomework=1"',
+					  'location.href="'.$link.'"',
 					  "Show only uncompleted problems");
     }
 
@@ -321,8 +325,8 @@
                     <input type="hidden" name="showOnlyHomework" value="'.$env{'form.showOnlyHomework'}.'" />
                     '.&mt('Sort by:').'
                     <select name="sort" onchange="document.sortForm.submit()">
-                       <option value="default"'.$selected{'default'}>'.&mt('Default').'</option>
-                       <option value="title"'.$selected{'title'}  >".&mt('Title').'</option>
+                       <option value="default"'.$selected{'default'}.'>'.&mt('Default').'</option>
+                       <option value="title"'.$selected{'title'}.'>'.&mt('Title').'</option>
                        <option value="duedate"'.$selected{'duedate'}.'>'.&mt('Duedate').'</option>
                        <option value="discussion"'.$selected{'discussion'}.'>'.&mt('Has New Discussion').'</option>
                     </select>