[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm /interface lonparmset.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 15 Jul 2003 21:12:01 -0000
www Tue Jul 15 17:12:01 2003 EDT
Modified files:
/loncom/homework inputtags.pm
/loncom/interface lonparmset.pm
Log:
Bug #1942: being able to disable receipt display.
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.107 loncom/homework/inputtags.pm:1.108
--- loncom/homework/inputtags.pm:1.107 Tue Jun 24 15:18:01 2003
+++ loncom/homework/inputtags.pm Tue Jul 15 17:12:01 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.107 2003/06/24 19:18:01 albertel Exp $
+# $Id: inputtags.pm,v 1.108 2003/07/15 21:12:01 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -343,7 +343,11 @@
} else {
$message = "<b>You are correct.</b>";
}
- $message.=' Your receipt is '.&Apache::lonnet::receipt;
+ unless ($ENV{'course.'.
+ $ENV{'request.course.id'}.
+ '.disable_receipt_display'} eq 'yes') {
+ $message.='<br />Your receipt is '.&Apache::lonnet::receipt;
+ }
}
$bgcolor=$possiblecolors{'correct'};
$button=0;
@@ -359,8 +363,12 @@
$bgcolor=$possiblecolors{'charged_try'};
$button=1;
} else {
- $message = "<b>You are correct.</b> Your receipt is ".
- &Apache::lonnet::receipt;
+ $message = "<b>You are correct.</b>";
+ unless ($ENV{'course.'.
+ $ENV{'request.course.id'}.
+ '.disable_receipt_display'} eq 'yes') {
+ $message.='<br />Your receipt is '.&Apache::lonnet::receipt;
+ }
$bgcolor=$possiblecolors{'correct'};
$button=0;
$previousmsg='';
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.114 loncom/interface/lonparmset.pm:1.115
--- loncom/interface/lonparmset.pm:1.114 Thu Jul 10 02:16:29 2003
+++ loncom/interface/lonparmset.pm Tue Jul 15 17:12:01 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.114 2003/07/10 06:16:29 www Exp $
+# $Id: lonparmset.pm,v 1.115 2003/07/15 21:12:01 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1529,7 +1529,7 @@
'have different numbers and answers</font>',
'problem_stream_switch'
=> '<b>Allow problems to be split over pages</b><br />'.
- ' ("<tt>yes</tt>" if allowed, anything else if not)',,
+ ' ("<tt>yes</tt>" if allowed, anything else if not)',
'anonymous_quiz'
=> '<b>Anonimous quiz/exam</b><br />'.
' (<tt><b>yes</b> to avoid print students names </tt>)',
@@ -1537,7 +1537,10 @@
'when enrolling students</b>',
'default_enrollment_end_date' => '<b>Default ending date '.
'when enrolling students</b>',
- 'languages' => '<b>Languages used</b>'
+ 'languages' => '<b>Languages used</b>',
+ 'disable_receipt_display'
+ => '<b>Disable display of problem receipts</b><br />'.
+ ' ("<tt>yes</tt>" to disable, anything else if not)'
);
my @Display_Order = ('url','description','courseid',
'default_xml_style','pageseparators',
@@ -1547,6 +1550,7 @@
'languages',
'rndseed',
'problem_stream_switch',
+ 'disable_receipt_display',
'spreadsheet_default_classcalc',
'spreadsheet_default_studentcalc',
'spreadsheet_default_assesscalc',