hii
i want to hide the upcoming event block from student.please help
you could try this one
blocks\calendar_upcoming\block_calendar_upcoming.php
/**
* Return the content of this block.
*
* @return stdClass the content
*/
public function get_content() {
global $CFG, $USER; // get the global $USER
if(is_siteadmin($USER->id)) { // we condition the function, eg. only show for admin
require_once($CFG->dirroot.'/calendar/lib.php');
if ($this->content !== null) {
return $this->content;
} ... }
That way the block won´t appear to students
Regards!!
Or you could just turn editing on and edit Roles for the block. Click the roles icon (it will say it is unavailable, but that's not entirely true). Then in administration, click permissions and you can remove any permission you don't want to have access to the block. Remember, at the front page level and My home, the role is Authenticated user.