original_string: public function get_label(base_task $task = null) {
          // If a task has been provided and the label is not already set meaningfully
          // we will attempt to improve it.
          if (!is_null($task) && $this->label == $this->setting->get_name() && strpos($this->setting->get_name(), '_include') !== false) {
              if ($this->setting->get_level() == backup_setting::SECTION_LEVEL) {
                  $this->label = get_string('includesection', 'backup', $task->get_name());
              } else if ($this->setting->get_level() == backup_setting::ACTIVITY_LEVEL) {
                  $this->label = $task->get_name();
              }
          }
          return $this->label;
      }
code: public function get_label(base_task $task = null) {
          // If a task has been provided and the label is not already set meaningfully
          // we will attempt to improve it.
          if (!is_null($task) && $this->label == $this->setting->get_name() && strpos($this->setting->get_name(), '_include') !== false) {
              if ($this->setting->get_level() == backup_setting::SECTION_LEVEL) {
                  $this->label = get_string('includesection', 'backup', $task->get_name());
              } else if ($this->setting->get_level() == backup_setting::ACTIVITY_LEVEL) {
                  $this->label = $task->get_name();
              }
          }
          return $this->label;
      }
code_tokens: public function get_label ( base_task $ task = null ) { // If a task has been provided and the label is not already set meaningfully // we will attempt to improve it. if ( ! is_null ( $ task ) && $ this -> label == $ this -> setting -> get_name ( ) && strpos ( $ this -> setting -> get_name ( ) , '_include' ) !== false ) { if ( $ this -> setting -> get_level ( ) == backup_setting :: SECTION_LEVEL ) { $ this -> label = get_string ( 'includesection' , 'backup' , $ task -> get_name ( ) ) ; } else if ( $ this -> setting -> get_level ( ) == backup_setting :: ACTIVITY_LEVEL ) { $ this -> label = $ task -> get_name ( ) ; } } return $ this -> label ; }
docstring: Gets the label for this item
  @param base_task $task Optional, if provided and the setting is an include
  $task is used to set the setting label
  @return string
docstring_tokens: Gets the label for this item