Best practice forum (Archived)

Program coding error detected

 
CaoSarah
Program coding error detected
CaoSarah 发表于 2013年11月25日 Monday 15:52
 

I have an instance on 2.2.20, and get the following message: Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified. 

It appears when there are exceptions for time allowance. 'All users' was selected and then 'dismiss and take no action' when this error pops up and the exceptions were not acted on. It also appears when attempting to 'override and add program'.

Has this been fixed in an update already or is it a new bug? I saw in the 2.2.21 release notes "T-10875 Remove unresolved exceptions when users are unassigned from a Program" and wanted to check if it was the same. 

CogginsSimon
Re: Program coding error detected
CogginsSimon 发表于 2013年11月25日 Monday 16:08
小组 Totara

Hi Sarah,

It's a bit difficult to say if that's the same bug. Would you be able to turn debugging to developer level (Admin > Development > Debugging) then revisit the page and post a screenshot of the full error you get?

That would help us narrow down the exact cause and work out if it's the same issue or not.

Many thanks,

Simon

CaoSarah
Re: Program coding error detected
CaoSarah 发表于 2013年11月26日 Tuesday 10:03
 

Hi Simon,

Here is the debug message:

Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.

More information about this error

Stack trace:
    • line 1055 of /lib/dml/mysqli_native_moodle_database.php: coding_exception thrown
    • line 1111 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
    • line 233 of /totara/program/program_exception.class.php: call to mysqli_native_moodle_database->update_record()
    • line 143 of /totara/program/program_exception.class.php: call to prog_exception->dismiss_exception()
    • line 270 of /totara/program/program_exception.class.php: call to prog_exception->handle()
    • line 70 of /totara/program/exception/resolve.php: call to time_allowance_exception->handle()

 

Best,

Sarah

 

CaoSarah
Re: Program coding error detected
CaoSarah 发表于 2013年12月2日 Monday 09:03
 

Any idea if this was fixed in an update or new?

 

CogginsSimon
Re: Program coding error detected
CogginsSimon 发表于 2013年12月2日 Monday 13:23
小组 Totara

That looks like a new bug, we will get someone to take a look now.

Simon

??
Re: Program coding error detected
?? 发表于 2014年01月9日 Thursday 17:06
 

Hi Sarah,

Apologies for the delay on this one.

It looks like your issue is related to the fix in 2.2.21 and is due to assignment records not being properly cleared up when users are unassigned, so the code is attempting to remove an exception that doesn't really exist.

I'd recommend an upgrade to 2.2.23 as both 2.2.21 and 2.2.23 contain fixes in this area. 2.2.23 also contains various Security fixes for both Totara and Moodle so you are probably best to upgrade to at least that point anyway - the latest 2.2 is 2.2.26.

Hope that helps,

Ciaran