Error: Could not insert workshop assessment

Error: Could not insert workshop assessment

by Lisa Barnstrom -
Number of replies: 2

Any clues as to why students and instructors in my course get this error when they try to assess someone else's submission? 

Any help is sincerely, genuinely appreciated!!
Lisa

Average of ratings: -
In reply to Lisa Barnstrom

Re: Error: Could not insert workshop assessment

by Danica D -

Hi Lisa,

Only recently I stumbled across the same problem and managed to find a solution. Upon turning on the debugging in Moodle, I received an explanation stating that a default value for the generalcomment (and subsequently teachercomment) field was missing. Since I was unable to set the default values in the relevant MySQL table, I added the following code to assess.php and locallib.php (in the mod/workshop folder):

$assessment->generalcomment = "";
$assessment->teachercomment = "";

The code was added before the following statement in assess.php:

if (!$assessment->id = insert_record("workshop_assessments", $assessment)) {
error("Could not insert workshop assessment!");
}

and before the statement below in locallib.php:

if (!$assessment->id = insert_record("workshop_assessments", $assessment)) {
error("List Student submissions: Could not insert workshop assessment!");
}

The above worked and the workshop module does not report errors any more.

Regards,

Danica

In reply to Danica D

Re: Error: Could not insert workshop assessment

by Isabel Renedo -
Hi

Do you know if this solution works for version 1.7.2?

Thanks smile
Isabel