public function get_context() {
        if ($this->type == BADGE_TYPE_SITE) {
            return context_system::instance();
        } else if ($this->type == BADGE_TYPE_COURSE) {
            return context_course::instance($this->courseid);
        } else {
            debugging('Something is wrong...');
        }
    }
public function get_context() {
        if ($this->type == BADGE_TYPE_SITE) {
            return context_system::instance();
        } else if ($this->type == BADGE_TYPE_COURSE) {
            return context_course::instance($this->courseid);
        } else {
            debugging('Something is wrong...');
        }
    }
public function get_context ( ) { if ( $ this -> type == BADGE_TYPE_SITE ) { return context_system :: instance ( ) ; } else if ( $ this -> type == BADGE_TYPE_COURSE ) { return context_course :: instance ( $ this -> courseid ) ; } else { debugging ( 'Something is wrong...' ) ; } }
Use to get context instance of a badge.
@return context instance.
Use to get context instance of a badge .