private function get_new_scale_definition($oldscaleid) {

        $data = array(
            'userid'            => 0,   // restore will remap to the current user
            'courseid'          => 0,   // global scale
            'description'       => '',
            'descriptionformat' => FORMAT_HTML,
        );

        switch ($oldscaleid) {
        case 0:
            $data['name']  = get_string('scalename0', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('no'), get_string('yes')));
            break;
        case 1:
            $data['name']  = get_string('scalename1', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('absent', 'workshopform_accumulative'),
                                                get_string('present', 'workshopform_accumulative')));
            break;
        case 2:
            $data['name']  = get_string('scalename2', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('incorrect', 'workshopform_accumulative'),
                                                get_string('correct', 'workshopform_accumulative')));
            break;
        case 3:
            $data['name']  = get_string('scalename3', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('poor', 'workshopform_accumulative'),
                                                '**',
                                                '*** ' . get_string('good', 'workshopform_accumulative')));
            break;
        case 4:
            $data['name']  = get_string('scalename4', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '**** ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        case 5:
            $data['name']  = get_string('scalename5', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '****',
                                                '***** ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        case 6:
            $data['name']  = get_string('scalename6', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '****',
                                                '*****',
                                                '******',
                                                '******* ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        }

        return $data;
    }
private function get_new_scale_definition($oldscaleid) {

        $data = array(
            'userid'            => 0,   // restore will remap to the current user
            'courseid'          => 0,   // global scale
            'description'       => '',
            'descriptionformat' => FORMAT_HTML,
        );

        switch ($oldscaleid) {
        case 0:
            $data['name']  = get_string('scalename0', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('no'), get_string('yes')));
            break;
        case 1:
            $data['name']  = get_string('scalename1', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('absent', 'workshopform_accumulative'),
                                                get_string('present', 'workshopform_accumulative')));
            break;
        case 2:
            $data['name']  = get_string('scalename2', 'workshopform_accumulative');
            $data['scale'] = implode(',', array(get_string('incorrect', 'workshopform_accumulative'),
                                                get_string('correct', 'workshopform_accumulative')));
            break;
        case 3:
            $data['name']  = get_string('scalename3', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('poor', 'workshopform_accumulative'),
                                                '**',
                                                '*** ' . get_string('good', 'workshopform_accumulative')));
            break;
        case 4:
            $data['name']  = get_string('scalename4', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '**** ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        case 5:
            $data['name']  = get_string('scalename5', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '****',
                                                '***** ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        case 6:
            $data['name']  = get_string('scalename6', 'workshopform_accumulative');
            $data['scale'] = implode(',', array('* ' . get_string('verypoor', 'workshopform_accumulative'),
                                                '**',
                                                '***',
                                                '****',
                                                '*****',
                                                '******',
                                                '******* ' . get_string('excellent', 'workshopform_accumulative')));
            break;
        }

        return $data;
    }
private function get_new_scale_definition ( $ oldscaleid ) { $ data = array ( 'userid' => 0 , // restore will remap to the current user 'courseid' => 0 , // global scale 'description' => '' , 'descriptionformat' => FORMAT_HTML , ) ; switch ( $ oldscaleid ) { case 0 : $ data [ 'name' ] = get_string ( 'scalename0' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( get_string ( 'no' ) , get_string ( 'yes' ) ) ) ; break ; case 1 : $ data [ 'name' ] = get_string ( 'scalename1' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( get_string ( 'absent' , 'workshopform_accumulative' ) , get_string ( 'present' , 'workshopform_accumulative' ) ) ) ; break ; case 2 : $ data [ 'name' ] = get_string ( 'scalename2' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( get_string ( 'incorrect' , 'workshopform_accumulative' ) , get_string ( 'correct' , 'workshopform_accumulative' ) ) ) ; break ; case 3 : $ data [ 'name' ] = get_string ( 'scalename3' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( '* ' . get_string ( 'poor' , 'workshopform_accumulative' ) , '**' , '*** ' . get_string ( 'good' , 'workshopform_accumulative' ) ) ) ; break ; case 4 : $ data [ 'name' ] = get_string ( 'scalename4' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( '* ' . get_string ( 'verypoor' , 'workshopform_accumulative' ) , '**' , '***' , '**** ' . get_string ( 'excellent' , 'workshopform_accumulative' ) ) ) ; break ; case 5 : $ data [ 'name' ] = get_string ( 'scalename5' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( '* ' . get_string ( 'verypoor' , 'workshopform_accumulative' ) , '**' , '***' , '****' , '***** ' . get_string ( 'excellent' , 'workshopform_accumulative' ) ) ) ; break ; case 6 : $ data [ 'name' ] = get_string ( 'scalename6' , 'workshopform_accumulative' ) ; $ data [ 'scale' ] = implode ( ',' , array ( '* ' . get_string ( 'verypoor' , 'workshopform_accumulative' ) , '**' , '***' , '****' , '*****' , '******' , '******* ' . get_string ( 'excellent' , 'workshopform_accumulative' ) ) ) ; break ; } return $ data ; }
Returns a definition of a legacy workshop scale

@see workshopform_accumulative_upgrade_scales
@param object $oldscaleid
@return array
Returns a definition of a legacy workshop scale