original_string: public function is_enabled() {
          if ($this->enabledcache === null) {
              $gradingmanager = get_grading_manager($this->assignment->get_context(), 'mod_assign', 'submissions');
              $controller = $gradingmanager->get_active_controller();
              $active = !empty($controller);
  
              if ($active) {
                  $this->enabledcache = false;
              } else {
                  $this->enabledcache = parent::is_enabled();
              }
          }
          return $this->enabledcache;
      }
code: public function is_enabled() {
          if ($this->enabledcache === null) {
              $gradingmanager = get_grading_manager($this->assignment->get_context(), 'mod_assign', 'submissions');
              $controller = $gradingmanager->get_active_controller();
              $active = !empty($controller);
  
              if ($active) {
                  $this->enabledcache = false;
              } else {
                  $this->enabledcache = parent::is_enabled();
              }
          }
          return $this->enabledcache;
      }
code_tokens: public function is_enabled ( ) { if ( $ this -> enabledcache === null ) { $ gradingmanager = get_grading_manager ( $ this -> assignment -> get_context ( ) , 'mod_assign' , 'submissions' ) ; $ controller = $ gradingmanager -> get_active_controller ( ) ; $ active = ! empty ( $ controller ) ; if ( $ active ) { $ this -> enabledcache = false ; } else { $ this -> enabledcache = parent :: is_enabled ( ) ; } } return $ this -> enabledcache ; }
docstring: Override the default is_enabled to disable this plugin if advanced grading is active
  
  @return bool
docstring_tokens: Override the default is_enabled to disable this plugin if advanced grading is active