[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhtmlcommon.pm /xml scripttag.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 12 Oct 2004 23:26:49 -0000


albertel		Tue Oct 12 19:26:49 2004 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonhtmlcommon.pm 
    /loncom/xml	scripttag.pm 
  Log:
  - except for the <nobr> and the selected="on" Edit mode on a homework problem is now xhtml 1.0 transtional compliant
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.218 loncom/interface/loncommon.pm:1.219
--- loncom/interface/loncommon.pm:1.218	Tue Oct 12 18:37:37 2004
+++ loncom/interface/loncommon.pm	Tue Oct 12 19:26:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.218 2004/10/12 22:37:37 albertel Exp $
+# $Id: loncommon.pm,v 1.219 2004/10/12 23:26:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -254,6 +254,7 @@
     if (!defined($mode)) { $mode='edit'; }
     my $resurl=&lastresurl();
     return <<END;
+// <!-- BEGIN LON-CAPA Internal
     var editbrowser = null;
     function openbrowser(formname,elementname,only,omit,titleelement) {
         var url = '$resurl/?';
@@ -306,6 +307,7 @@
         editsearcher = open(url,title,options,'1');
         editsearcher.focus();
     }
+// END LON-CAPA Internal -->
 END
 }
 
@@ -491,7 +493,7 @@
     my $first = "document.$formname.$firstselectname";
     # output the javascript to do the changing
     my $result = '';
-    $result.="<script>\n";
+    $result.="<script type=\"text/javascript\">\n";
     $result.="var select2data = new Object();\n";
     $" = '","';
     my $debug = '';
@@ -681,7 +683,8 @@
     }
     my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif");
     $template .= <<"ENDTEMPLATE";
- <script>
+ <script type="text/javascript">
+//<!-- BEGIN LON-CAPA Internal
 function helpMenu(caller) {
     if (caller == 'open') {
         newWindow =  window.open("","helpmenu","HEIGHT=$height,WIDTH=$width,resize=yes,scrollbars=yes" )
@@ -697,6 +700,7 @@
         caller.focus()
     }
 }
+// END LON-CAPA Internal -->
  </script>
  <a href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help Menu)" /></a>
 ENDTEMPLATE
@@ -3572,8 +3576,8 @@
 sub chartlink {
     my ($linktext, $sname, $sdomain) = @_;
     my $link = '<a href="/adm/statistics?reportSelected=student_assessment'.
-        '&SelectedStudent='.&Apache::lonnet::escape($sname.':'.$sdomain).
-        '&chartoutputmode='.HTML::Entities::encode('html, with all links').
+        '&amp;SelectedStudent='.&Apache::lonnet::escape($sname.':'.$sdomain).
+        '&amp;chartoutputmode='.HTML::Entities::encode('html, with all links').
        '">'.$linktext.'</a>';
 }
 
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.92 loncom/interface/lonhtmlcommon.pm:1.93
--- loncom/interface/lonhtmlcommon.pm:1.92	Tue Oct 12 18:55:21 2004
+++ loncom/interface/lonhtmlcommon.pm	Tue Oct 12 19:26:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.92 2004/10/12 22:55:21 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.93 2004/10/12 23:26:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -976,7 +976,7 @@
     if (defined($#fields)) {
 	unless ($#fields>=0) { return ''; }
     }
-    return '<a href="/adm/preferences?action=set_wysiwyg&wysiwyg=off&returnurl='.&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Disable WYSIWYG Editor').'</a>';
+    return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=off&returnurl=','<>&"').&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Disable WYSIWYG Editor').'</a>';
 }
 
 sub enablelink {
@@ -984,7 +984,7 @@
     if (defined($#fields)) {
 	unless ($#fields>=0) { return ''; }
     }
-    return '<a href="/adm/preferences?action=set_wysiwyg&wysiwyg=on&returnurl='.&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Enable WYSIWYG Editor').'</a>';
+    return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=on&returnurl=','<>&"').&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Enable WYSIWYG Editor').'</a>';
 }
 
 # ----------------------------------------- Script to activate only some fields
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.119 loncom/xml/scripttag.pm:1.120
--- loncom/xml/scripttag.pm:1.119	Fri Oct  8 09:43:31 2004
+++ loncom/xml/scripttag.pm	Tue Oct 12 19:26:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.119 2004/10/08 13:43:31 albertel Exp $
+# $Id: scripttag.pm,v 1.120 2004/10/12 23:26:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -394,7 +394,8 @@
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
   pop(@Apache::inputtags::import);
   my $result;
-  if ($target eq 'edit' ) { $result=&Apache::edit::end_table(); }
+  if ($target eq 'edit' ) { $result=&Apache::edit::end_row.
+				&Apache::edit::end_table(); }
   return $result;
 }