original_string: 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...');
          }
      }
code: 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...');
          }
      }
code_tokens: 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...' ) ; } }
docstring: Use to get context instance of a badge.
  @return context instance.
docstring_tokens: Use to get context instance of a badge .