original_string: public function is_editing_the_frontpage() {
          // There are some conditions to check related to contexts.
          $ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
              $this->page->context->instanceid == get_site()->id;
          $issiteindex = (strpos($this->page->pagetype, 'site-index') === 0);
          // So now we can be 100% sure if edition is happening at frontpage.
          return ($ctxconditions && $issiteindex);
      }
code: public function is_editing_the_frontpage() {
          // There are some conditions to check related to contexts.
          $ctxconditions = $this->page->context->contextlevel == CONTEXT_COURSE &&
              $this->page->context->instanceid == get_site()->id;
          $issiteindex = (strpos($this->page->pagetype, 'site-index') === 0);
          // So now we can be 100% sure if edition is happening at frontpage.
          return ($ctxconditions && $issiteindex);
      }
code_tokens: public function is_editing_the_frontpage ( ) { // There are some conditions to check related to contexts. $ ctxconditions = $ this -> page -> context -> contextlevel == CONTEXT_COURSE && $ this -> page -> context -> instanceid == get_site ( ) -> id ; $ issiteindex = ( strpos ( $ this -> page -> pagetype , 'site-index' ) === 0 ) ; // So now we can be 100% sure if edition is happening at frontpage. return ( $ ctxconditions && $ issiteindex ) ; }
docstring: Returns true if the user is editing a frontpage.
  @return bool
docstring_tokens: Returns true if the user is editing a frontpage .