[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
raeburn
raeburn at source.lon-capa.org
Sun Mar 22 20:04:02 EDT 2026
raeburn Mon Mar 23 00:04:02 2026 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
- Bug 6121
Omit display of grade status for each problem/part when generating a PDF
with form fields.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.597 loncom/homework/structuretags.pm:1.598
--- loncom/homework/structuretags.pm:1.597 Wed Dec 24 18:36:09 2025
+++ loncom/homework/structuretags.pm Mon Mar 23 00:04:02 2026
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.597 2025/12/24 18:36:09 raeburn Exp $
+# $Id: structuretags.pm,v 1.598 2026/03/23 00:04:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2327,8 +2327,11 @@
&& !$env{'form.grade_imsexport'}) {
# if part is zero, no <part>s existed, so we need show the current
# grading status
- my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);
- $result.= $gradestatus;
+ unless (($target eq 'tex') && ($env{'form.pdfFormFields'} eq 'yes') &&
+ ($status eq 'CAN_ANSWER') && ($Apache::lonhomework::type ne 'exam')) {
+ my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);
+ $result.= $gradestatus;
+ }
}
if (
(($target eq 'web') && ($env{'request.state'} ne 'construct')) ||
@@ -3294,6 +3297,8 @@
my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part,
$target);
if (($Apache::lonhomework::type eq 'exam' && $target eq 'tex') ||
+ (($target eq 'tex') && ($env{'form.pdfFormFields'} eq 'yes') &&
+ ($status eq 'CAN_ANSWER')) ||
($env{'form.grade_imsexport'})) {
$gradestatus='';
}
More information about the LON-CAPA-cvs
mailing list