original_string: protected function get_parent_context() : \context {
          global $PAGE;
          if ($this->parentcontext) {
              return $this->parentcontext;
          } else if ($PAGE->context && $PAGE->context instanceof \context_coursecat) {
              return $PAGE->context;
          }
          return \context_system::instance();
      }
code: protected function get_parent_context() : \context {
          global $PAGE;
          if ($this->parentcontext) {
              return $this->parentcontext;
          } else if ($PAGE->context && $PAGE->context instanceof \context_coursecat) {
              return $PAGE->context;
          }
          return \context_system::instance();
      }
code_tokens: protected function get_parent_context ( ) : \ context { global $ PAGE ; if ( $ this -> parentcontext ) { return $ this -> parentcontext ; } else if ( $ PAGE -> context && $ PAGE -> context instanceof \ context_coursecat ) { return $ PAGE -> context ; } return \ context_system :: instance ( ) ; }
docstring: Returns the parent context for the course
  
  @return \context
docstring_tokens: Returns the parent context for the course