Error when Grading an Assignment: invalidrecord

Error when Grading an Assignment: invalidrecord

by Ravindra Jayasinghe -
Number of replies: 3

Hi All,

I am receiving an error when grading an assignment as follows. Could you please help on this?

Error

Attachment Capture.JPG
Average of ratings: -
In reply to Ravindra Jayasinghe

Re: Error when Grading an Assignment: invalidrecord

by Ken Task -
Picture of Particularly helpful Moodlers

Turn on debugging - to developer - see what else moodle might be complaining about!

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Error when Grading an Assignment: invalidrecord

by Ravindra Jayasinghe -

Then the following error is appearing.  Can you help with this??

SELECT * FROM {external_functions} WHERE name = ?

[array (
  0 => 'mod_assign_get_participant',
)]
Error code: invalidrecord
* line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 73 of /lib/externallib.php: call to moodle_database->get_record()
* line 185 of /lib/externallib.php: call to external_api::external_function_info()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()



Attachment Capture.JPG
In reply to Ravindra Jayasinghe

Re: Error when Grading an Assignment: invalidrecord

by Ken Task -
Picture of Particularly helpful Moodlers

What is your version of Moodle?

Am looking at version 3.8.2+ (Build: 20200506).

Not a programmer/developer ...

mod_assign_get_participant
call to external_api::external_function_info()

Line 73 of /lib/externallib.php ...

is in this section:

    /**
     * Returns detailed function information
     *
     * @param string|object $function name of external function or record from external_function
     * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more $
     *                        MUST_EXIST means throw exception if no record or multiple records found
     * @return stdClass description or false if not found or exception thrown
     * @since Moodle 2.0
     */
    public static function external_function_info($function, $strictness=MUST_EXIST) {
        global $DB, $CFG;

Are some of your users authenticating via an external source?  Looks like your moodle cannot find a users information - first user in that course.

You can see by the comments strictness could be set to 'IGNORE_MISSING'.

It is never advised to hack core code.

In your screen shot, no user is seen.  When entering grading an assignment there are two links ... use the link to display all users ... rather than attempting to grade the first assignment.

Also check cron job frequency ... there is a task to attempt to prepare assignments for annotation/etc ... ie, grading.

'SoS', Ken