[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm lonmenu.pm lonpdfupload.pm mydesk.tab

raeburn raeburn at source.lon-capa.org
Fri Feb 6 19:00:21 EST 2026


raeburn		Sat Feb  7 00:00:21 2026 EDT

  Modified files:              
    /loncom/interface	mydesk.tab lonmenu.pm courseprefs.pm 
                     	lonpdfupload.pm 
  Log:
  - Bug 6121
    Include "PDF Form" link in secondary menu row in page header when course
    allows upload of a completed form originally generated via Print utility. 
  
  
Index: loncom/interface/mydesk.tab
diff -u loncom/interface/mydesk.tab:1.186 loncom/interface/mydesk.tab:1.187
--- loncom/interface/mydesk.tab:1.186	Sat Jan 10 02:18:50 2026
+++ loncom/interface/mydesk.tab	Sat Feb  7 00:00:20 2026
@@ -1,4 +1,4 @@
-# $Id: mydesk.tab,v 1.186 2026/01/10 02:18:50 raeburn Exp $
+# $Id: mydesk.tab,v 1.187 2026/02/07 00:00:20 raeburn Exp $
 # primary menu links
 # Apache::lonmenu::primary_menu() generates a menu from these elements
 # prim: item belongs to primary menu
@@ -75,6 +75,7 @@
 #                   (and not included in course content).
 #   - showfeeds: course context and user has mdc or cev priv, or course feeds exist
 #   - showresv: course context and user cannot view or manage grades, and slots exist
+#   - showform: show this link if PDF forms accepted for student upload in a Course
 #   - always: show this link even if user hasn't selected a role
 #   - crseditCourse: user can modify content in a Course
 #   - crseditCommunity: user can modify content in a Community
@@ -103,6 +104,7 @@
 scnd:/adm/whatsnew:::What's New:whn
 scnd:/adm/quickgrades:::Grades:nvgr:grades
 scnd:[javascript]chat_win();:::Chat:plc:chat
+scnd:/adm/pdfupload:::PDF Form:showform:pdfform
 scnd::::Grades:vgr
 scnd::::People:viewusers
 scnd::::Settings:params
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.569 loncom/interface/lonmenu.pm:1.570
--- loncom/interface/lonmenu.pm:1.569	Sat Jan 24 18:29:10 2026
+++ loncom/interface/lonmenu.pm	Sat Feb  7 00:00:20 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.569 2026/01/24 18:29:10 raeburn Exp $
+# $Id: lonmenu.pm,v 1.570 2026/02/07 00:00:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -506,8 +506,8 @@
         }
     }
 
-    my ($cdom,$cnum,$showsyllabus,$showfeeds,$showresv,$grouptools,
-        $lti,$ltimapres,%ltiexc,%menuopts);
+    my ($cdom,$cnum,$showsyllabus,$showfeeds,$showresv,$showform,
+        $grouptools,$lti,$ltimapres,%ltiexc,%menuopts);
     $grouptools = 0;
     if ($env{'request.course.id'}) {
         $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
@@ -531,6 +531,7 @@
                 $showresv = 1;
             }
         }
+        $showform = &Apache::loncommon::pdfforms_allowed();
         if ($env{'request.course.groups'} ne '') {
             foreach my $group (split(/:/,$env{'request.course.groups'})) {
                 next unless ($group =~ /^\w+$/);
@@ -631,6 +632,8 @@
                 && !$canmgr;
         next if    $$menuitem[4]   eq 'showresv'
                 && !$showresv;
+        next if    $$menuitem[4]   eq 'showform'
+                && !$showform;
         next if    $$menuitem[4]   eq 'whn'
                 && !$canviewwnew;
         next if    $$menuitem[4]   eq 'params'
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.141 loncom/interface/courseprefs.pm:1.142
--- loncom/interface/courseprefs.pm:1.141	Fri Jan 16 15:43:01 2026
+++ loncom/interface/courseprefs.pm	Sat Feb  7 00:00:20 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.141 2026/01/16 15:43:01 raeburn Exp $
+# $Id: courseprefs.pm,v 1.142 2026/02/07 00:00:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7492,7 +7492,7 @@
                        text  => ['name','role','crs','disc','fdbk'],
                        links => ['pers','logo','menu','comm','roles','help','logout'],
                        list => ['about','prefs','port','wish','anno','rss','srch','brse'],
-                       inline => ['cont','grades','chat','people','groups','resv','syll','feeds'],
+                       inline => ['cont','grades','chat','people','groups','resv','pdfform','syll','feeds'],
                      );
     return (\@order,\%categories);
 }
@@ -7539,6 +7539,7 @@
                people => 'People',
                groups => 'Groups',
                resv => 'Reservations',
+               pdfform => 'PDF Forms',
                syll => 'Syllabus',
                feeds => 'Feeds',
     );
Index: loncom/interface/lonpdfupload.pm
diff -u loncom/interface/lonpdfupload.pm:1.29 loncom/interface/lonpdfupload.pm:1.30
--- loncom/interface/lonpdfupload.pm:1.29	Fri Feb  6 22:41:57 2026
+++ loncom/interface/lonpdfupload.pm	Sat Feb  7 00:00:21 2026
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # PDF Form Upload Handler
 #
-# $Id: lonpdfupload.pm,v 1.29 2026/02/06 22:41:57 raeburn Exp $
+# $Id: lonpdfupload.pm,v 1.30 2026/02/07 00:00:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -155,7 +155,7 @@
              );
 
     my $result = 
-       '<h2 class="LC_heading_2">'.&mt('Submit answers via PDF upload').'</h2>'
+       '<h2 class="LC_heading_2">'.&mt('Submit answers via PDF Form upload').'</h2>'
        .'<p>'.&mt('This course allows you to submit your answers to assignments by uploading a PDF containing completed form fields.').'</p>'
        .'<ul><li>'.&mt('Your PDF must have been originally downloaded via the print utility (with PDF form fields option selected in the Layout options)').'</li>'
        .'<li>'.&mt('Submissions for past-due problems will be ignored, unless a grace period is in effect').'</li></ul>'




More information about the LON-CAPA-cvs mailing list