[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonparmset.pm
amueller
amueller@source.lon-capa.org
Fri, 06 Nov 2009 10:14:12 -0000
amueller Fri Nov 6 10:14:12 2009 EDT
Modified files:
/loncom/interface lonparmset.pm lonhtmlcommon.pm
Log:
lonparmset:
- Parameter Screen show the numbers for the 3 units again. Parameter screen for a single resource from course content and Parameter
Screen that you get after passing through helper mode show no numbers. ( Closed Bug 6017).
- deleted some </div> tags that doesn't have an open <div> tag.
- added a comment
lonhtmlcommon:
-with the third argument you can control, if you would like to show the numbers in subroutine topic_bar or not.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.477 loncom/interface/lonparmset.pm:1.478
--- loncom/interface/lonparmset.pm:1.477 Thu Nov 5 18:10:37 2009
+++ loncom/interface/lonparmset.pm Fri Nov 6 10:14:12 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.477 2009/11/05 18:10:37 raeburn Exp $
+# $Id: lonparmset.pm,v 1.478 2009/11/06 10:14:12 amueller Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2197,9 +2197,7 @@
# Display Unit 1 "General Parameters"
if (!$pssymb) {
- #$r->print(&Apache::lonhtmlcommon::topic_bar (1,&mt('General Parameters')));
- $r->print('<div class="LC_Box">');
- $r->print('<h4 class="LC_hcell">'.&mt('Resource Specification').'</h4>');
+ $r->print(&Apache::lonhtmlcommon::topic_bar (1,&mt('Resource Specification')));
$r->print(<<COURSECONTENTSCRIPT);
<script type="text/javascript">
// <![CDATA[
@@ -2229,29 +2227,24 @@
$r->print(&Apache::lonhtmlcommon::row_closure(1));
$r->print(&Apache::lonhtmlcommon::end_pick_box());
$r->print('</div>');
- $r->print('</div>');
#Display Unit 2 "Select Parameter"
- #$r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Select Parameters')));
- $r->print('<div class="LC_Box">');
- $r->print('<h4 class="LC_hcell">'.&mt('Parameter Specification').'</h4>');
+ $r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Parameter Specification')));
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder);
+ $r->print(&Apache::lonhtmlcommon::topic_bar (3,&mt('User Specification (optional)')));
} else {
+ # parameter screen for a single resource.
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);
my $title = &Apache::lonnet::gettitle($pssymb);
$r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource).
'<input type="hidden" value="'.$pssymb.'" name="symb" />'.
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'.
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />');
+ $r->print(&Apache::lonhtmlcommon::topic_bar (3,&mt('User Specification (optional)'),'no_number'));
}
- $r->print('</div>');
- #$r->print(&Apache::lonhtmlcommon::topic_bar (3,&mt('User Selection')));
- $r->print('<div class="LC_Box">');
- $r->print('<h4 class="LC_hcell">'.&mt('User Specification (optional)').'</h4>');
$r->print(&Apache::lonhtmlcommon::start_pick_box());
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
$r->print(&Apache::lonhtmlcommon::row_closure(1));
$r->print(&Apache::lonhtmlcommon::end_pick_box());
- $r->print('</div>');
# parm selection is shown: display parm update button
$r->print('<p>'
@@ -2275,6 +2268,7 @@
.'</a>'
.'</p>'
);
+
# Display Messages
$r->print('<div>'.$message.'</div>');
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.238 loncom/interface/lonhtmlcommon.pm:1.239
--- loncom/interface/lonhtmlcommon.pm:1.238 Wed Nov 4 17:51:26 2009
+++ loncom/interface/lonhtmlcommon.pm Fri Nov 6 10:14:12 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.238 2009/11/04 17:51:26 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.239 2009/11/06 10:14:12 amueller Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1819,12 +1819,21 @@
# with a background color defined in the corresponding CSS: LC_topic_bar
#
sub topic_bar {
- my ($imgnum,$title) = @_;
- return '<div class="LC_topic_bar">'
+ my ($imgnum,$title, $show_number) = @_;
+ my $output = undef;
+ if (!$show_number) {
+ $output = '<div class="LC_topic_bar">'
.'<img src="/res/adm/pages/bl_step'.$imgnum.'.gif"'
.' alt="'.&mt('Step [_1]',$imgnum).'" />'
.' '.$title
.'</div>';
+ } else {
+ $output = '<div class="LC_topic_bar">'
+ .$title
+ .'</div>';
+ }
+
+ return $output;
}
##############################################