Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Last commit of the glorious glossary files to 16_STABLE, performed now

that everything is properly branched. See MDL-9032
  • Loading branch information...
commit 4afc877819b9d7792bc42dfa0145ae904188d834 1 parent 86f4390
stronk7 authored
Showing with 20 additions and 14 deletions.
  1. +19 −13 mod/glossary/sql.php
  2. +1 −1  mod/glossary/view.php
32 mod/glossary/sql.php
View
@@ -14,10 +14,23 @@
$sqlsortkey = NULL;
$textlib = textlib_get_instance();
-/// Pivot is the field that set the break by groups (category, initial, author name, etc)
+/// Calculate the SQL sortkey to be used by the SQL statements later
+ switch ( $sortkey ) {
+ case "CREATION":
+ $sqlsortkey = "timecreated";
+ break;
+ case "UPDATE":
+ $sqlsortkey = "timemodified";
+ break;
+ case "FIRSTNAME":
+ $sqlsortkey = "firstname";
+ break;
+ case "LASTNAME":
+ $sqlsortkey = "lastname";
+ break;
+ }
+ $sqlsortorder = $sortorder;
-/// fullpivot indicate if the whole pivot should be compared agasint the db or just the first letter
-/// printpivot indicate if the pivot should be printed or not
switch ($CFG->dbtype) {
case 'postgres7':
$as = 'as';
@@ -27,17 +40,10 @@
break;
}
- switch ( $sortkey ) {
- case "CREATION":
- $sqlsortkey = "timecreated";
- break;
-
- case "UPDATE":
- $sqlsortkey = "timemodified";
- break;
- }
- $sqlsortorder = $sortorder;
+/// Pivot is the field that set the break by groups (category, initial, author name, etc)
+/// fullpivot indicate if the whole pivot should be compared agasint the db or just the first letter
+/// printpivot indicate if the pivot should be printed or not
$fullpivot = 1;
$userid = '';
2  mod/glossary/view.php
View
@@ -13,7 +13,7 @@
$mode = optional_param('mode', '', PARAM_ALPHA); // term entry cat date letter search author approval
$hook = optional_param('hook', '', PARAM_CLEAN); // the term, entry, cat, etc... to look for based on mode
$fullsearch = optional_param('fullsearch', 0,PARAM_INT); // full search (concept and definition) when searching?
- $sortkey = optional_param('sortkey', 'CREATION', PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
+ $sortkey = optional_param('sortkey', '', PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
$sortorder = optional_param('sortorder', 'ASC', PARAM_ALPHA); // it defines the order of the sorting (ASC or DESC)
$offset = optional_param('offset', 0,PARAM_INT); // entries to bypass (for paging purposes)
$page = optional_param('page', 0,PARAM_INT); // Page to show (for paging purposes)
Please sign in to comment.
Something went wrong with that request. Please try again.