[LON-CAPA-cvs] cvs: loncom /interface groupsort.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sun, 19 Mar 2006 22:26:34 -0000


albertel		Sun Mar 19 17:26:34 2006 EDT

  Modified files:              
    /loncom/interface	groupsort.pm 
  Log:
  - start_page
  
  
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.39 loncom/interface/groupsort.pm:1.40
--- loncom/interface/groupsort.pm:1.39	Tue Feb  7 14:46:30 2006
+++ loncom/interface/groupsort.pm	Sun Mar 19 17:26:31 2006
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.39 2006/02/07 19:46:30 albertel Exp $
+# $Id: groupsort.pm,v 1.40 2006/03/19 22:26:31 albertel Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -301,12 +301,8 @@
     }
 
 # output start of web page
-    my $html=&Apache::lonxml::xmlbegin();
-    $r->print(<<END);
-$html
-<head>
-<title>The LearningOnline Network With CAPA Group Sorter</title>
-<script language='javascript'>
+    my $js = <<END;
+<script type="text/javascript">
 function insertRowInLastRow() {
     opener.insertrow(opener.maxrow);
     opener.addobj(opener.maxrow,'e&2');
@@ -334,7 +330,6 @@
     document.forms.groupsort.submit();
 }
 </script>
-</head>
 END
     # read pertinent machine configuration
     my $domain  = $r->dir_config('lonDefDomain');
@@ -364,7 +359,8 @@
 		'pa' => 'Path',
                 'in' => 'Include'
 		);
-	$r->print(&Apache::loncommon::bodytag('Sort Imported Resources'));
+	$r->print(&Apache::loncommon::start_page('Sort Imported Resources',
+						 $js));
 	$r->print(<<END);
 <b><font color="#888888">$lt{'fin'}</font></b>
 <form method='post' action='/adm/groupsort' name='groupsort'
@@ -408,8 +404,9 @@
 	$r->print("<td colspan='2' bgcolor='$titleclr'><b>$lt{'ti'}</b></td>\n");
 	$r->print("<td bgcolor='$titleclr'><b>$lt{'pa'}</b></td></tr>\n");
     } else {
+	$r->print(&Apache::loncommon::start_page(undef,$js,
+						 {'only_body' => 1});
 	$r->print(<<END);
-<body>
 <form method='post' action='/adm/groupsort' name='groupsort'
       enctype='application/x-www-form-urlencoded'>
 <input type="hidden" name="fnum" value="$clen" />
@@ -454,10 +451,8 @@
 </script>
 END
     }
-    $r->print(<<END);
-</body>
-</html>
-END
+
+    $r->print(&Apache::loncommon::end_page());
 
     return OK;
 }