Error code: ddltablenotexist

Error code: ddltablenotexist

by ben achour maryem -
Number of replies: 11

Hello !

I encountered this error while developing an activity module I did not find a solution, can you help me please !

Thank you !..

Average of ratings: -
In reply to ben achour maryem

Re: Error code: ddltablenotexist

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
From the error, it looks like your plugin, mod_evaluation, does not define a table "evaluation" in its main "install.xml" file (or the installation has not been run with this defined). Similarly, your "access.php" script does not define the capability "mod/evaluation:add", which is required by all activity modules.

See any example activities built in to Moodle core if you're unsure about the exact details of either of these.
In reply to Davo Smith

Re: Error code: ddltablenotexist

by ben achour maryem -

I defined the evaluation table in install.php and the mod / evaluation capacity: addistance but it shows the same error

There is no other solution ?
In reply to ben achour maryem

Re: Error code: ddltablenotexist

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Has the plugin's table in the database been created? You may need to uninstall and reinstall the plugin so that the database changes in db/install.xml and/or db/install.php get applied. Make sure you have a copy of the plugin source code before uninstalling.

In reply to ben achour maryem

Re: Error code: ddltablenotexist

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Why did you define the table in install.php? You need to use the XMLDB editor (built in to Moodle) to define it in install.xml.

Once you've done that, you need to uninstall your plugin (through the admin interface) and then let Moodle re-install it, to make sure the table (and the capability) is properly set up (for later changes, you can use upgrade.php to modify the table / capability definitions, but for the first version, it's just easier to run an uninstall/reinstall, as there shouldn't be any data yet for your plugin to get deleted during that process).
In reply to Davo Smith

Re: Error code: ddltablenotexist

by ben achour maryem -
sorry misspelled i mean that i define the table in install.xml 
In reply to ben achour maryem

Re: Error code: ddltablenotexist

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
OK good - so did you try uninstalling + reinstalling your plugin via the admin interface?
In reply to Davo Smith

Re: Error code: ddltablenotexist

by ben achour maryem -

yes i uninstall and reinstall the plugin then it displays me this but i am defiened mod/evaluation:addinstance :

The module evaluation does not define the standard capability mod/evaluation:addinstance

line 2075 of \course\lib.php: call to debugging()

line 472 of \course\modlib.php: call to course_allowed_module()

line 797 of \course\modlib.php: call to can_add_moduleinfo()

line 72 of \course\modedit.php: call to prepare_new_moduleinfo_data()


this is the file access.php 

In reply to ben achour maryem

Re: Error code: ddltablenotexist

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It may not be the issue, but you look like you're missing a closing ");" at the end of the access.php file. That may be preventing the install from completing successfully?
In reply to ben achour maryem

Re: Error code: ddltablenotexist

by ben achour maryem -

the problem was to increase the plugin version, it works now 

but .it does not show me the logo of the module, it is under the pix folder.