[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm

raeburn raeburn at source.lon-capa.org
Thu Sep 16 12:02:41 EDT 2021


raeburn		Thu Sep 16 16:02:41 2021 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  - Support for Ubuntu 20 LTS.
    Explicitly include ORDER BY, as an implicit sort based on GROUP BY was
    eliminated in MySQL 8.  
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.207 loncom/interface/loncoursedata.pm:1.208
--- loncom/interface/loncoursedata.pm:1.207	Fri Mar  5 17:17:57 2021
+++ loncom/interface/loncoursedata.pm	Thu Sep 16 16:02:41 2021
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.207 2021/03/05 17:17:57 raeburn Exp $
+# $Id: loncoursedata.pm,v 1.208 2021/09/16 16:02:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2520,7 +2520,7 @@
         &Apache::lonnet::logthis('prepared then executed '.$/.$request);
         return undef;
     }
-    $request = 'SELECT score,COUNT(*) FROM '.$tmptable.' GROUP BY score';
+    $request = 'SELECT score,COUNT(*) FROM '.$tmptable.' GROUP BY score ORDER BY score';
 #    &Apache::lonnet::logthis("request = \n".$request);
     $sth = $dbh->prepare($request);
     $sth->execute();




More information about the LON-CAPA-cvs mailing list