public static function get_scale_values($scaleid) {
        global $DB;
        $params = self::validate_parameters(self::get_scale_values_parameters(),
            array(
                'scaleid' => $scaleid,
            )
        );
        $context = context_system::instance();
        self::validate_context($context);
        // The following section is not learning plan specific and so has not been moved to the api.
        // Retrieve the scale value from the database.
        $scale = grade_scale::fetch(array('id' => $scaleid));
        $scalevalues = $scale->load_items();
        foreach ($scalevalues as $key => $value) {
            // Add a key (make the first value 1).
            $scalevalues[$key] = array(
                    'id' => $key + 1,
                    'name' => external_format_string($value, $context->id)
                );
        }
        return $scalevalues;
    }
public static function get_scale_values($scaleid) {
        global $DB;
        $params = self::validate_parameters(self::get_scale_values_parameters(),
            array(
                'scaleid' => $scaleid,
            )
        );
        $context = context_system::instance();
        self::validate_context($context);
        // The following section is not learning plan specific and so has not been moved to the api.
        // Retrieve the scale value from the database.
        $scale = grade_scale::fetch(array('id' => $scaleid));
        $scalevalues = $scale->load_items();
        foreach ($scalevalues as $key => $value) {
            // Add a key (make the first value 1).
            $scalevalues[$key] = array(
                    'id' => $key + 1,
                    'name' => external_format_string($value, $context->id)
                );
        }
        return $scalevalues;
    }
public static function get_scale_values ( $ scaleid ) { global $ DB ; $ params = self :: validate_parameters ( self :: get_scale_values_parameters ( ) , array ( 'scaleid' => $ scaleid , ) ) ; $ context = context_system :: instance ( ) ; self :: validate_context ( $ context ) ; // The following section is not learning plan specific and so has not been moved to the api. // Retrieve the scale value from the database. $ scale = grade_scale :: fetch ( array ( 'id' => $ scaleid ) ) ; $ scalevalues = $ scale -> load_items ( ) ; foreach ( $ scalevalues as $ key => $ value ) { // Add a key (make the first value 1). $ scalevalues [ $ key ] = array ( 'id' => $ key + 1 , 'name' => external_format_string ( $ value , $ context -> id ) ) ; } return $ scalevalues ; }
Get the values associated with a scale.

@param int $scaleid Scale ID
@return array Values for a scale.
Get the values associated with a scale .