[LON-CAPA-cvs] cvs: loncom /interface courseclassifier.pm /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Sat Nov 5 02:00:07 EDT 2022


raeburn		Sat Nov  5 06:00:07 2022 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
    /loncom/interface	courseclassifier.pm 
  Log:
  - In cases where course codes have been assigned to course(s) in a domain,
    but instcode_format() routine in localenroll.pm has not been customized,
    totcodes item (value is number of courses with codes) must be present 
    in the instcats hash ref.
  - Without this the text: "No official courses to display" will be shown above
    a listing of official courses, and clicking the "Show more details" link
    for a course will do nothing.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1500 loncom/lonnet/perl/lonnet.pm:1.1501
--- loncom/lonnet/perl/lonnet.pm:1.1500	Sat Oct 29 18:13:29 2022
+++ loncom/lonnet/perl/lonnet.pm	Sat Nov  5 06:00:07 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1500 2022/10/29 18:13:29 raeburn Exp $
+# $Id: lonnet.pm,v 1.1501 2022/11/05 06:00:07 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2924,6 +2924,7 @@
             if (&auto_instcode_format($caller,$dom,\%coursecodes,\%codes,
                                       \@codetitles,\%cat_titles,\%cat_order) eq 'ok') {
                 $instcats = {
+                                totcodes => $totcodes, 
                                 codes => \%codes,
                                 codetitles => \@codetitles,
                                 cat_titles => \%cat_titles,
Index: loncom/interface/courseclassifier.pm
diff -u loncom/interface/courseclassifier.pm:1.27 loncom/interface/courseclassifier.pm:1.28
--- loncom/interface/courseclassifier.pm:1.27	Tue Jul 23 13:58:53 2019
+++ loncom/interface/courseclassifier.pm	Sat Nov  5 06:00:07 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utilities for classifying courses based on institutional code
 #
-# $Id: courseclassifier.pm,v 1.27 2019/07/23 13:58:53 raeburn Exp $
+# $Id: courseclassifier.pm,v 1.28 2022/11/05 06:00:07 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -528,6 +528,9 @@
             %{$cat_titles} = %{$instcats->{'cat_titles'}};
             %{$cat_order} = %{$instcats->{'cat_order'}};
             $totcodes = scalar(keys(%{$codes}));
+            if ((!$totcodes) && (exists($instcats->{'totcodes'}))) {
+                $totcodes = $instcats->{'totcodes'};  
+            }
             &build_code_selections($codes,$codetitles,$cat_titles,$cat_order,
                                    \%idlist,\%idnums,\%idlist_titles);
             my ($scripttext,$longtitles) = 




More information about the LON-CAPA-cvs mailing list