Created
April 4, 2016 12:40
-
-
Save sela/803b5da87a8903dcb074dee48e129e17 to your computer and use it in GitHub Desktop.
This file contains 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
protected function render_custom_menu(custom_menu $menu) { | |
global $USER; | |
// If the menu has no children return an empty string | |
if (!$menu->has_children()) { | |
return ''; | |
} | |
if (isloggedin()){ | |
$useremail=$USER->email; | |
// acording to the email address we detect if the user is the teacher and similar to moodle 1 enable or disable the button |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment