[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhelpmenu.pm lonhtmlcommon.pm lonparmset.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 03 Jun 2005 15:47:31 -0000


This is a MIME encoded message

--www1117813651
Content-Type: text/plain

www		Fri Jun  3 11:47:31 2005 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonhelpmenu.pm lonhtmlcommon.pm 
                     	lonparmset.pm 
  Log:
  Bug #3751:
  * if there is no topical help, don't send them to the "Missing Page"
  * it there is topical help, respect it
  
  
--www1117813651
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20050603114731.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.263 loncom/interface/loncommon.pm:1.264
--- loncom/interface/loncommon.pm:1.263	Mon May 30 15:50:43 2005
+++ loncom/interface/loncommon.pm	Fri Jun  3 11:47:29 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.263 2005/05/30 19:50:43 www Exp $
+# $Id: loncommon.pm,v 1.264 2005/06/03 15:47:29 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -673,7 +673,6 @@
     foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) {
         $$_ = &Apache::lonnet::escape($$_);
     }
-
     if (!$stayOnPage) {
          $link = "javascript:helpMenu('open')";
     } else {
@@ -713,9 +712,9 @@
     return;
 }
 function writeHelp(caller) {
-    caller.document.write('$html<head><title>LON-CAPA Help Menu</title><meta http-equiv="pragma" content="no-cache"></head>')
-    caller.document.write("<frameset rows='105,*' border='0'><frame name='bannerframe'  src='$banner_link'><frame name='bodyframe' src='$details_link'></frameset>")
-    caller.document.write("</html>")
+    caller.document.writeln('$html<head><title>LON-CAPA Help Menu</title><meta http-equiv="pragma" content="no-cache"></head>')
+    caller.document.writeln("<frameset rows='105,*' border='0'><frame name='bannerframe'  src='$banner_link'><frame name='bodyframe' src='$details_link'></frameset>")
+    caller.document.writeln("</html>")
     caller.document.close()
     caller.focus()
 }
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.20 loncom/interface/lonhelpmenu.pm:1.21
--- loncom/interface/lonhelpmenu.pm:1.20	Thu Apr  7 02:56:23 2005
+++ loncom/interface/lonhelpmenu.pm	Fri Jun  3 11:47:29 2005
@@ -177,15 +177,9 @@
 	  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
            <tr bgcolor="$tablecolor">
 END
-    if (($component_url) || ($env{'user.adv'})) {
-        if ($component_url) {
-            $r->print("
-            <td align=\"center\"><b><a href=\"$component_url\" target=\"bodyframe\">");
-        } elsif ($env{'user.adv'}) {
-            $r->print('<td align="center">&nbsp;<b><a href="/adm/help/nohelptopic.html" target="bodyframe">');
-        }
-        $r->print('
-  <img src="'.$location.'/help/gif/smallHelp.gif" border="0" alt="(Topic help)" valign="middle" />&nbsp;Topic help</a></b>&nbsp;</td>');
+    if ($component_url) {
+	$r->print("<td align=\"center\"><b><a href=\"$component_url\" target=\"bodyframe\">".
+		  '<img src="'.$location.'/help/gif/smallHelp.gif" border="0" alt="(Topic help)" valign="middle" />&nbsp;Topic help</a></b>&nbsp;</td>');
     }
     if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
         $r->print('
@@ -249,7 +243,8 @@
         'vthp' => 'Visit the help page for ',
         'disp' => 'Display the page in the inline help system that covers this topic.',
         'crac' => 'Create an account for yourself in the LON-CAPA Bugzilla tracking system, if you wish to report bugs you have encountered in the LON-CAPA software, or if you have suggestions for improvements in LON-CAPA.',
-        'inhs' => 'Inline help system for',
+        'inhs' => 'Topical help system for',
+	'noto' => 'There is no specific topical help item for',
         'coth' => 'Consult the inline help system for this topic.',
         'cont' => 'Contact the LON-CAPA support team',
         'suhr' => 'Submit a help request to the team responsible for LON-CAPA support at this institution.',
@@ -286,7 +281,7 @@
             } elsif ($env{'user.adv'}) {
                 $r->print("
               <ul>
-               <li><td align=\"center\">&nbsp;<a href=\"/adm/help/nohelptopic.html\">$lt{'inhs'} $topic</a></li></ul>
+               <li><td align=\"center\">&nbsp;<a href=\"/adm/help/nohelptopic.html\">$lt{'noto'} $topic</a></li></ul>
                <p>$lt{'coth'}</p>");
             }
         }
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.105 loncom/interface/lonhtmlcommon.pm:1.106
--- loncom/interface/lonhtmlcommon.pm:1.105	Fri May 27 20:35:47 2005
+++ loncom/interface/lonhtmlcommon.pm	Fri Jun  3 11:47:29 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.105 2005/05/28 00:35:47 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.106 2005/06/03 15:47:29 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1112,6 +1112,7 @@
         # Make the faq and bug data cascade
         my $faq = '';
         my $bug = '';
+	my $help='';
         # The last breadcrumb does not have a link, so handle it separately.
         my $last = pop(@Crumbs);
         #
@@ -1136,6 +1137,7 @@
                  map {
                      $faq = $_->{'faq'} if (exists($_->{'faq'}));
                      $bug = $_->{'bug'} if (exists($_->{'bug'}));
+                     $help = $_->{'help'} if (exists($_->{'help'}));
                      my $result = '<a href="'.$_->{'href'}.'" ';
                      if (defined($_->{'target'}) && $_->{'target'} ne '') {
                          $result .= 'target="'.$_->{'target'}.'" ';
@@ -1151,6 +1153,8 @@
         my $icons = '';
         $faq = $last->{'faq'} if (exists($last->{'faq'}));
         $bug = $last->{'bug'} if (exists($last->{'bug'}));
+        $help = $last->{'help'} if (exists($last->{'help'}));
+        $component_help=($component_help?$component_help:$help);
 #        if ($faq ne '') {
 #            $icons .= &Apache::loncommon::help_open_faq($faq);
 #        }
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.203 loncom/interface/lonparmset.pm:1.204
--- loncom/interface/lonparmset.pm:1.203	Fri Jun  3 10:25:49 2005
+++ loncom/interface/lonparmset.pm	Fri Jun  3 11:47:29 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.203 2005/06/03 14:25:49 www Exp $
+# $Id: lonparmset.pm,v 1.204 2005/06/03 15:47:29 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -451,7 +451,7 @@
 
     my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',
                                             'onUnload="pclose()"');
-    my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table');
+    my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table Mode Parameter Setting');
     my $chooseopt=&Apache::loncommon::select_dom_form($udom,'udom').' '.
         &Apache::loncommon::selectstudent_link('parmform','uname','udom');
     my $selscript=&Apache::loncommon::studentbrowser_javascript();
@@ -463,9 +463,6 @@
 		    'oi'    => "or ID",
 		    'ad'    => "at Domain"
 				       );
-    my $overallhelp=
-	&Apache::loncommon::help_open_menu('','Setting Parameters','Course_Setting_Parameters','',10,'Instructor Interface');
-    my $assessparmhelp=&Apache::loncommon::help_open_topic("Cascading_Parameters","Assessment Parameters");
     my $html=&Apache::lonxml::xmlbegin();
     $r->print(<<ENDHEAD);
 $html
@@ -516,7 +513,6 @@
 </head>
 $bodytag
 $breadcrumbs
-$overallhelp
 ENDHEAD
     my %sectionhash=();
     my $sections='';
@@ -970,10 +966,6 @@
 
     &startpage($r,$id,$udom,$csec,$uname,scalar(keys(%allkeys)));
 
-#    if ($env{'form.url'}) {
-#	$r->print('<input type="hidden" value="'.$env{'form.url'}.
-#		  '" name="url"><input type="hidden" name="command" value="set">');
-#    }
     $r->print('<input type="hidden" value="true" name="prevvisit">');
 
     foreach ('tolerance','date_default','date_start','date_end',
@@ -2088,8 +2080,7 @@
     my @menu =
         (
           { text => 'Set Course Environment Parameters',
-            help => 'Course_Setting_Parameters',
-            action => 'crsenv',
+	    action => 'crsenv',
             permission => $parm_permission,
             },
           { text => 'Set/Modify Course Assessment Parameters - Helper Mode',
@@ -2103,6 +2094,7 @@
           { text => 'Set/Modify Course Assessment Parameters - Table Mode',
             action => 'settable',
             permission => $parm_permission,
+            help => 'Cascading_Parameters',
             },
 #          { text => 'Set Parameter Default Preferences',
 #            help => 'Course_View_Class_List',
@@ -2163,7 +2155,7 @@
     &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/parmset",
 					    text=>"Parameter Manager",
-					    faq=>9,
+					    faq=>10,
 					    bug=>'Instructor Interface'});
 
 # ----------------------------------------------------- Needs to be in a course
@@ -2208,7 +2200,8 @@
 	    &overview($r);
         } elsif ($env{'form.action'} eq 'settable' && $parm_permission) {
             &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',
-						    text=>"Table Mode"});
+						    text=>"Table Mode",
+						    help => 'Course_Setting_Parameters'});
 	    &assessparms($r);
         }
         

--www1117813651--