Created
August 1, 2012 10:43
-
-
Save marxjohnson/3225744 to your computer and use it in GitHub Desktop.
Patch for Moodle 2 to modify the mentees block to sort users alphabetically. Copyright Richard Taunton Sixth Form College, UK. Licenced under GNU GPL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a0198387d484d0fe083ed1a32c0fe5f9f6806d6b Mon Sep 17 00:00:00 2001 | |
From: Mark Johnson <[email protected]> | |
Date: Mon, 29 Nov 2010 15:01:08 +0000 | |
Subject: [PATCH 06/78] Modified mentees block to sort users alphabetically | |
--- | |
blocks/mentees/block_mentees.php | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/blocks/mentees/block_mentees.php b/blocks/mentees/block_mentees.php | |
index aa340af..a3f4222 100644 | |
--- a/blocks/mentees/block_mentees.php | |
+++ b/blocks/mentees/block_mentees.php | |
@@ -33,7 +33,8 @@ class block_mentees extends block_base { | |
WHERE ra.userid = ? | |
AND ra.contextid = c.id | |
AND c.instanceid = u.id | |
- AND c.contextlevel = ".CONTEXT_USER, array($USER->id))) { | |
+ AND c.contextlevel = ? | |
+ ORDER BY u.lastname", array($USER->id, CONTEXT_USER))) { | |
$this->content->text = '<ul>'; | |
foreach ($usercontexts as $usercontext) { | |
-- | |
1.7.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment