[LON-CAPA-cvs] cvs: loncom /homework response.pm /homework/caparesponse caparesponse.pm /interface lonmenu.pm
riegler
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 04 Sep 2008 22:47:23 -0000
riegler Thu Sep 4 18:47:23 2008 EDT
Modified files:
/loncom/homework response.pm
/loncom/homework/caparesponse caparesponse.pm
/loncom/interface lonmenu.pm
Log:
Corrected pencilbutton behaviour when question already answered.
Modified pencilbutton style.
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.198 loncom/homework/response.pm:1.199
--- loncom/homework/response.pm:1.198 Thu Sep 4 18:06:23 2008
+++ loncom/homework/response.pm Thu Sep 4 18:47:19 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.198 2008/09/04 22:06:23 riegler Exp $
+# $Id: response.pm,v 1.199 2008/09/04 22:47:19 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -533,7 +533,7 @@
newwin = window.open("/adm/dragmath/applet/MaximaPopup.html","","width=565,height=400,resizable");
}
</script>
-<a href="javascript:edit_${id}_${field}('${field}');void(0);"><img class="stift" src='$iconpath/stift.gif' alt='$button' /></a>
+<a href="javascript:edit_${id}_${field}('${field}');void(0);"><img class="stift" src='$iconpath/stift.gif' alt='$button' /></a>$helplink
ENDFORMULABUTTON
}
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.228 loncom/homework/caparesponse/caparesponse.pm:1.229
--- loncom/homework/caparesponse/caparesponse.pm:1.228 Thu Sep 4 09:49:19 2008
+++ loncom/homework/caparesponse/caparesponse.pm Thu Sep 4 18:47:19 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.228 2008/09/04 13:49:19 riegler Exp $
+# $Id: caparesponse.pm,v 1.229 2008/09/04 22:47:19 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -606,7 +606,7 @@
}
}
if (($target eq 'web') && ($tag eq 'formularesponse')
- && ($Apache::lonhomework::type ne 'exam')) {
+ && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')) {
$result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id");
}
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.239 loncom/interface/lonmenu.pm:1.240
--- loncom/interface/lonmenu.pm:1.239 Sat Jul 5 19:21:23 2008
+++ loncom/interface/lonmenu.pm Thu Sep 4 18:47:20 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.239 2008/07/05 23:21:23 raeburn Exp $
+# $Id: lonmenu.pm,v 1.240 2008/09/04 22:47:20 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1018,6 +1018,35 @@
return $output;
}
+sub inlinemenu_new {
+ undef(@inlineremote);
+ undef(%category_members);
+ &rawconfig(1);
+ my $output='<table id="LC_mainmenu"><tr>';
+ for (my $col=1; $col<=2; $col++) {
+ $output.='<td class="LC_mainmenu_column">';
+ for (my $row=1; $row<=8; $row++) {
+ foreach my $cat (keys(%category_members)) {
+ if ($category_positions{$cat} ne "$col,$row") { next; }
+ $output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>';
+ my %active=();
+ foreach my $menu_item (split(/\:/,$category_members{$cat})) {
+ if ($inlineremote[$menu_item]) {
+ $active{$menu_item}=1;
+ }
+ }
+ foreach my $item (sort(keys(%active))) {
+ $output.=$inlineremote[$item];
+ }
+ $output.='</table>';
+ }
+ }
+ $output.="</td>";
+ }
+ $output.="</tr></table>";
+ return $output;
+}
+
sub rawconfig {
my $textualoverride=shift;
my $output='';