Skip to content

Warning if there is more than one BTEC scale #5

Description

@marcusgreen

There should only ever be one instance of a scale called BTEC. However if for some reason more than one exists the error message is unhelpful and confusing generating the following fairly incomprehensible error message.
Error: mdb->get_record() found more than one record!
line 1492 of \lib\dml\moodle_database.php: call to debugging()
line 1452 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
line 1431 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
line 65 of \grade\grading\form\btec\edit_form.php: call to moodle_database->get_record()
line 194 of \lib\formslib.php: call to gradingform_btec_editbtec->definition()
line 46 of \grade\grading\form\btec\edit.php: call to moodleform->__construct()

A check needs to be put in to make it clear what the error is and how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions