Download & Extend

Duplicate assignment INSERT warning

Project:Gradebook
Version:master
Component:Code
Category:bug report
Priority:normal
Assigned:rwohleb
Status:active

Issue Summary

... cut-and-pasted from our email thread the other day ...

After hitting Submit when creating a new Assignment, you'll get into assignment_insert via node_invoke($node, 'insert') via node_save()... Then, you'll get into gradebookapi_nodeapi($node, 'insert', ...) which will end up calling gradebookapi_assignment_insert() all over again.

so i think that you can get rid of these:

function assignment_load($node) {
return gradebookapi_assignment_load($node);
}
function assignment_insert($node) {
gradebookapi_assignment_insert($node);
}
function assignment_update($node) {
gradebookapi_assignment_update($node);
}
function assignment_delete($node) {
gradebookapi_assignment_delete($node);
}

...because an assignment node is really just a plain old node with nothing added other than the stuff that the gradebookapi adds... and the gradebookapi can add that stuff to any node type that can be "an assignment" via hook_nodeapi.

Comments

#1

Assigned to:Anonymous» rwohleb

Duplicate insert bug is fixed in CVS. However, there is still a bug here.

    * warning: Cannot use a scalar value as an array in /home/techsanc/public_html/gradebook/includes/form.inc on line 303.
    * warning: implode() [function.implode]: Bad arguments. in /home/techsanc/public_html/gradebook/includes/form.inc on line 304.

#2

Yes I am still getting something like the error message described above.

I am using 4.7.x

----
* warning: Cannot use a scalar value as an array in /home/turningp/public_html/includes/form.inc on line 319.
* warning: implode() [function.implode]: Bad arguments. in /home/turningp/public_html/includes/form.inc on line 320.
----

Have there been any updates?

Really excited about this project. Let me know if you need any testing.

Regards,
Stephanie

nobody click here