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

bisitz bisitz@source.lon-capa.org
Mon, 06 Apr 2009 13:29:03 -0000


bisitz		Mon Apr  6 13:29:03 2009 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  Optimized header of Simple Problem Screen (Student View):
  - Replaced hardcoded and outdated table by standard function list
  - "10 minutes take effect" message:
      - Don't show anymore (Info needed on edit screen, not here, but still exists as comment)
      - Added warning style and moved out of function list
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.441 loncom/homework/structuretags.pm:1.442
--- loncom/homework/structuretags.pm:1.441	Fri Mar 27 01:07:10 2009
+++ loncom/homework/structuretags.pm	Mon Apr  6 13:29:02 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.441 2009/03/27 01:07:10 raeburn Exp $
+# $Id: structuretags.pm,v 1.442 2009/04/06 13:29:02 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2034,9 +2034,16 @@
         my $url=$env{'request.noversionuri'};
         $url=~s/\?.*$//;
 	my ($symb) = &Apache::lonnet::whichuser();
-	$result='<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>'.
-                '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'.&mt('Edit').'</a> - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.').
-&Apache::loncommon::help_open_topic('Caching').'</td></tr></table><br />';
+#       Warning make more sense and is more important on edit screen
+#       $result='<p class="LC_warning">'
+#              .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
+#              .&Apache::loncommon::help_open_topic('Caching')
+#              .'</p>';
+        $result.=&Apache::lontemplate::start_functionslist()
+                .&Apache::lontemplate::item_functionslist(
+                     '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'.&mt('Edit').'</a>')
+                .&Apache::lontemplate::end_functionslist();
+
     }
     return $result;
 }