[LON-CAPA-cvs] cvs: loncom /homework response.pm /homework/caparesponse caparesponse.pm /publisher packages.tab
riegler
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 09 Sep 2008 13:56:52 -0000
riegler Tue Sep 9 09:56:52 2008 EDT
Modified files:
/loncom/homework response.pm
/loncom/publisher packages.tab
/loncom/homework/caparesponse caparesponse.pm
Log:
Added ressource parameter to turn DragMath-Editor on/off.
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.202 loncom/homework/response.pm:1.203
--- loncom/homework/response.pm:1.202 Mon Sep 8 12:08:36 2008
+++ loncom/homework/response.pm Tue Sep 9 09:56:48 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.202 2008/09/08 16:08:36 riegler Exp $
+# $Id: response.pm,v 1.203 2008/09/09 13:56:48 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -572,7 +572,10 @@
}
if ($target eq 'web') {
&setup_prior_tries_hash(\&format_prior_response_math);
- if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') && (&Apache::lonxml::get_param('turnoneditor',$parstack,$safeeval) ne 'no')) {
+ my $partid = $Apache::inputtags::part;
+ my $id = $Apache::inputtags::response[-1];
+ if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')
+ && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')) {
$result.=&edit_mathresponse_button($id,"HWVAL_$id");
}
}
Index: loncom/publisher/packages.tab
diff -u loncom/publisher/packages.tab:1.56 loncom/publisher/packages.tab:1.57
--- loncom/publisher/packages.tab:1.56 Mon Sep 8 12:08:37 2008
+++ loncom/publisher/packages.tab Tue Sep 9 09:56:49 2008
@@ -84,10 +84,10 @@
essayresponse&uploadedfiletypes&display:Allowed File Extensions for Uploaded Files
formularesponse&turnoneditor&type:string_yesno
formularesponse&turnoneditor&default:yes
-formularesponse&turnoneditor&display:Show the pencil icon to access the editor
+formularesponse&turnoneditor&display:Enable DragMath-Editor.
mathresponse&turnoneditor&type:string_yesno
mathresponse&turnoneditor&default:yes
-mathresponse&turnoneditor&display:Show the pencil icon to access the editor
+mathresponse&turnoneditor&display:Enable DragMath-Editor.
#parameters for things by extension
extension_sequence&encrypturl&type:string_yesno
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.230 loncom/homework/caparesponse/caparesponse.pm:1.231
--- loncom/homework/caparesponse/caparesponse.pm:1.230 Mon Sep 8 12:08:37 2008
+++ loncom/homework/caparesponse/caparesponse.pm Tue Sep 9 09:56:49 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.230 2008/09/08 16:08:37 riegler Exp $
+# $Id: caparesponse.pm,v 1.231 2008/09/09 13:56:49 riegler Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -606,8 +606,10 @@
}
}
if (($target eq 'web') && ($tag eq 'formularesponse')
- && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')&& (&Apache::lonxml::get_param('turnoneditor',$parstack,$safeeval) ne 'no')) {
+ && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')
+ && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')){
$result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id");
+#hier
}
&Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical);