protected static function queue_conversion($event) {
        global $DB;

        $submissionid = $event->other['submissionid'];
        $submissionattempt = $event->other['submissionattempt'];
        $fields = array( 'submissionid' => $submissionid, 'submissionattempt' => $submissionattempt);
        $record = (object) $fields;

        $exists = $DB->get_record('assignfeedback_editpdf_queue', $fields);
        if (!$exists) {
            $DB->insert_record('assignfeedback_editpdf_queue', $record);
        } else {
            // This submission attempt was already queued, so just reset the existing failure counter to ensure it gets processed.
            $exists->attemptedconversions = 0;
            $DB->update_record('assignfeedback_editpdf_queue', $exists);
        }
    }