[LON-CAPA-cvs] cvs: loncom /homework lonsimpleproblemedit.pm
bisitz
bisitz@source.lon-capa.org
Mon, 06 Apr 2009 12:59:07 -0000
bisitz Mon Apr 6 12:59:07 2009 EDT
Modified files:
/loncom/homework lonsimpleproblemedit.pm
Log:
Optimized header of Simple Problem Editor Screen:
- Replaced hardcoded and outdated table by standard function list
- Either show error message or display function list
- "10 minutes take effect" message: Added warning style and moved out of function list
Index: loncom/homework/lonsimpleproblemedit.pm
diff -u loncom/homework/lonsimpleproblemedit.pm:1.20 loncom/homework/lonsimpleproblemedit.pm:1.21
--- loncom/homework/lonsimpleproblemedit.pm:1.20 Sun Feb 1 20:40:28 2009
+++ loncom/homework/lonsimpleproblemedit.pm Mon Apr 6 12:59:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Problem Parameter Setting "Editor"
#
-# $Id: lonsimpleproblemedit.pm,v 1.20 2009/02/01 20:40:28 raeburn Exp $
+# $Id: lonsimpleproblemedit.pm,v 1.21 2009/04/06 12:59:07 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -222,15 +222,28 @@
$spell_header));
if ($symb) {
$r->print('<h1>'.&Apache::lonnet::gettitle($symb).'</h1>');
- $r->print('<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>');
+ $r->print('<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>'
+ );
my $displaylink = &get_parent_uri($symb);
- if ($displaylink ne '') {
- $r->print('<a href="'.$displaylink.'">'.&mt('Student View').'</a> - ');
+ if ($displaylink ne '') {
+ $r->print(&Apache::lontemplate::start_functionslist()
+ .&Apache::lontemplate::item_functionslist(
+ '<a href="'.$displaylink.'">'.&mt('Student View').'</a>')
+ .&Apache::lontemplate::end_functionslist()
+ );
} else {
- $r->print('<span class="LC_error">'.&mt('An error occurred retrieving the link to this problem').'<br />'.&mt('You may need to [_1]re-select the course[_2] and then return to this resource to view it.','<a href="/adm/roles">','</a>').'</span><br />');
+ $r->print('<p class="LC_error">'
+ .&mt('An error occurred retrieving the link to this problem.')
+ .'<br />'
+ .&mt('You may need to [_1]re-select the course[_2] and then return to this resource to view it.'
+ ,'<a href="/adm/roles">','</a>')
+ .'</p>'
+ );
}
- $r->print(&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>');
+
$r->print('<table border="2" bgcolor="#FFFFFF" width="100%"><tr><td>'.
&rawrendering($symb).
'</td></tr></table><br />');