original_string: public function load_choices() {
          global $CFG; // Remove this line and behold the horror of behat test failures!
          $this->choices = array();
          foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
              if (file_exists($plugindir . '/lib.php')) {
                  require_once($plugindir . '/lib.php');
                  // Check to see if the class exists. Check the correct plugin convention first.
                  if (class_exists('gradereport_' . $plugin)) {
                      $classname = 'gradereport_' . $plugin;
                  } else if (class_exists('grade_report_' . $plugin)) {
                      // We are using the old plugin naming convention.
                      $classname = 'grade_report_' . $plugin;
                  } else {
                      continue;
                  }
                  if ($classname::supports_mygrades()) {
                      $this->choices[$plugin] = get_string('pluginname', 'gradereport_' . $plugin);
                  }
              }
          }
          // Add an option to specify an external url.
          $this->choices['external'] = get_string('externalurl', 'grades');
          return true;
      }
code: public function load_choices() {
          global $CFG; // Remove this line and behold the horror of behat test failures!
          $this->choices = array();
          foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) {
              if (file_exists($plugindir . '/lib.php')) {
                  require_once($plugindir . '/lib.php');
                  // Check to see if the class exists. Check the correct plugin convention first.
                  if (class_exists('gradereport_' . $plugin)) {
                      $classname = 'gradereport_' . $plugin;
                  } else if (class_exists('grade_report_' . $plugin)) {
                      // We are using the old plugin naming convention.
                      $classname = 'grade_report_' . $plugin;
                  } else {
                      continue;
                  }
                  if ($classname::supports_mygrades()) {
                      $this->choices[$plugin] = get_string('pluginname', 'gradereport_' . $plugin);
                  }
              }
          }
          // Add an option to specify an external url.
          $this->choices['external'] = get_string('externalurl', 'grades');
          return true;
      }
code_tokens: public function load_choices ( ) { global $ CFG ; // Remove this line and behold the horror of behat test failures! $ this -> choices = array ( ) ; foreach ( core_component :: get_plugin_list ( 'gradereport' ) as $ plugin => $ plugindir ) { if ( file_exists ( $ plugindir . '/lib.php' ) ) { require_once ( $ plugindir . '/lib.php' ) ; // Check to see if the class exists. Check the correct plugin convention first. if ( class_exists ( 'gradereport_' . $ plugin ) ) { $ classname = 'gradereport_' . $ plugin ; } else if ( class_exists ( 'grade_report_' . $ plugin ) ) { // We are using the old plugin naming convention. $ classname = 'grade_report_' . $ plugin ; } else { continue ; } if ( $ classname :: supports_mygrades ( ) ) { $ this -> choices [ $ plugin ] = get_string ( 'pluginname' , 'gradereport_' . $ plugin ) ; } } } // Add an option to specify an external url. $ this -> choices [ 'external' ] = get_string ( 'externalurl' , 'grades' ) ; return true ; }
docstring: Loads an array of choices for the configselect control.
  
  @return bool always returns true.
docstring_tokens: Loads an array of choices for the configselect control .