SEB :: Creating Assignment and Get .... Error Writing to the Database

SEB :: Creating Assignment and Get .... Error Writing to the Database

by steven bailey -
Number of replies: 4

First of all 

I am really new to Moodle and have volunteered to be the Moodle Administrator for a small non-profit group as I was one of the few there with a software background.  So if I am posting in the wrong forum .... bare with me please.  smile

I have googled extensively and not found any Forum Threads similar to my issue.

So here is the situation.  We recently set up a course and have been learning by doing.  There are a dozen 'teachers' aka the members of the non-profit and a couple of hundred 'students' those who are using the multi-media trainings provided.  As all the trainings share elements and the majority of users are super non-computer literate, we have chosen a flat course structure instead of multiple courses.

Its probably not the most standard Moodle setup but the easiest for us to do at the moment as we need a complete overview from all students graded at all time from multiple teachers who should have the ability to add some new sections as needed.

We hit a hurdle some weeks ago which we were able to resolve based upon reading forum posts (very useful those).  It concerned the #52 Section Limitation.  Which we have addressed and set to #100.  I mention this as it 'feels' very similar the problem we are having.

We are able to create new topics.  We are able to add activities to all topics (new and old).  With the exception of asignments.  We have seemed to reach a limit of assignments where no new assignments can be created.  Thru usability testing we have discovered that if we delete an assignment from any of the sections we can add an assignment there or somewhere else.  But we can not add a second one (aka seems like we have reached a limit)  Even though all the other activity additions (chat database forum etc) work just fine and are not limited in any fashion.

QUESTION:  Does this seem reasonable that this is a similar issue to the Maximum Number of Sections poblem that we had?  If so what is the resolution?

We are running are running 3.6 (Build: 20181203) and the course format is a Topics Format with default mySQL database backend.  The Moodle Site is hosted on a third party server where we have admin access.

Thanks in advance to any support

Steve

Average of ratings: -
In reply to steven bailey

Re: SEB :: Creating Assignment and Get .... Error Writing to the Database

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Well, I have to ask - how many assignments are there in this course?  The course designer in me is wondering how to persuade you not to go this route!! All that aside, have you turned debugging on and see if there is an error message that pops up - I almost wonder if you have hit a hard drive space or database space issue on your host - I have never heard of an assignment limit...

In reply to Emma Richardson

Re: SEB :: Creating Assignment and Get .... Error Writing to the Database

by steven bailey -
Hi Emma
Thanks for your response so it looks like my issue is a bit more complicated than changing a setting.
Here is my error.log file relevant to this. The process was the same. I deleted one of the old assignments. Everything OK. I added an assignment. Everything OK. I added a second assignment. And this is the error results.
Would appreciate any help from you (or anyone that you might know that can help here) as I am really new to Moodle and am really trying to keep that non-profit site up and running.
Thanks in advance
Steve

Debug info: Out of range value for column 'grademax' at row 1
UPDATE mdlh1_grade_items SET courseid = ?,categoryid = ?,itemname = ?,itemtype = ?,itemmodule = ?,iteminstance = ?,itemnumber = ?,iteminfo = ?,idnumber = ?,calculation = ?,gradetype = ?,grademax = ?,grademin = ?,scaleid = ?,outcomeid = ?,gradepass = ?,multfactor = ?,plusfactor = ?,aggregationcoef = ?,aggregationcoef2 = ?,sortorder = ?,display = ?,decimals = ?,locked = ?,locktime = ?,needsupdate = ?,weightoverride = ?,timecreated = ?,timemodified = ?,hidden = ? WHERE id=?
[array (
0 => '13',
1 => NULL,
2 => NULL,
3 => 'course',
4 => NULL,
5 => '10',
6 => NULL,
7 => NULL,
8 => '99999999',
9 => NULL,
10 => 1,
11 => 106346.0,
12 => 0.0,
13 => NULL,
14 => NULL,
15 => '0.00000',
16 => 1.0,
17 => 0.0,
18 => 0.0,
19 => 0.0,
20 => '1',
21 => '0',
22 => NULL,
23 => '0',
24 => '0',
25 => 1,
26 => '0',
27 => '1550675244',
28 => 1580835550,
29 => '0',
30 => '19',
)]
Error code: dmlwriteexception


Stack trace:
line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1557 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1589 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 253 of /lib/grade/grade_object.php: call to mysqli_native_moodle_database->update_record()
line 307 of /lib/grade/grade_item.php: call to grade_object->update()
line 1559 of /lib/grade/grade_category.php: call to grade_item->update()
line 448 of /lib/grade/grade_category.php: call to grade_category->auto_update_max()
line 1178 of /lib/gradelib.php: call to grade_category->pre_regrade_final_grades()
line 348 of /course/modlib.php: call to grade_regrade_final_grades()
line 176 of /course/modlib.php: call to edit_module_post_actions()
line 154 of /course/modedit.php: call to add_moduleinfo()
In reply to steven bailey

Re: SEB :: Creating Assignment and Get .... Error Writing to the Database

by steven bailey -
Some additional comments.

I recreated the test.
The VALID Assignment did have a default value of 9000 as the grade Max. It worked.
The NEXT Assignment did have a default value of 9000 as the grade Max. It failed.

I deleted the valid and tried again.
The VALID Assignment did have a default value of 9000 as the grade Max. It worked.
The NEXT Assignment did have a default value of 9000 as the grade Max. I changed it to 100 before saving. It worked.

I did look into site administration/grades/general settings

And it had this
Grade point maximum
gradepointmax

9000
Default: 100
This setting determines the maximum grade point value available in an activity.

Grade point default
gradepointdefault

9000
Default: 100
This setting determines the default value for the grade point value available in a grade item.

?????
Which had always worked in the past but it seems not to work anymore once I reach this magical boundary of a certain number of assignments.

Any thoughts???
In reply to steven bailey

Re: SEB :: Creating Assignment and Get .... Error Writing to the Database

by steven bailey -
I would be interested in the answer to the above as it maks me feel nervous that I do not know what and why the database is doing something...

BUT
NOW A QUESTION...

9000 as a default is ... strange.... guess I typed this in when I set up Moodle by accident.
Can I change this now (we already have 9 months of course data ( .... sections/assignments) in the database.
Set it back to 100? The normal default?
Or will this break the database and the values already in?
aka does it rescale all grade points?

If Moodle/Database has some weird iteractions because of that 9000 this might fix it.
BUT
if anyone can answer the issue of the original problem it would ease my mind

Again. Thanks in advance
Steve