Module Creation

Module Creation

על ידי Ricardo Godinho בתאריך
מספר תגובות: 6

Hello, ive been trying to develop a test module for moodle 2.6 to add some courses and some students through a xml file. Is this link http://docs.moodle.org/dev/NEWMODULE_Documentation still reliable on creating a module? Because i get an error message when i go to Site Administration block -> Miscellaneous -> XMLDB editor . I can't edit any of the tables on my module.

Ive setted the correct version in version.php. 

צרופה CapturaEcra-1.png
ממוצע דרוגים: -
בתגובה ל: Ricardo Godinho

Re: Module Creation

על ידי Darko Miletić בתאריך

Look at the text of error. It clearly states that you do not have version.php file in the plugin directory. This is required file.

See here for more details.

http://docs.moodle.org/dev/version.php

בתגובה ל: Darko Miletić

Re: Module Creation

על ידי Ricardo Godinho בתאריך

Do you mean mod directory? Because i have the version.php there.

צרופה CapturaEcra-2.png
בתגובה ל: Ricardo Godinho

Re: Module Creation

על ידי Darko Miletić בתאריך

Your file permissions are not OK. Web server should be able to read moodle files. The code that throws error is this:

        if (!is_readable($fullmod.'/version.php')) {
            throw new plugin_defective_exception($component, 'Missing version.php');
        }
בתגובה ל: Darko Miletić

Re: Module Creation

על ידי Ricardo Godinho בתאריך

Hmm, but when i create manually a course /add a user in moodle, it does normally appear  on sqlbuddy(using it btw).

בתגובה ל: Ricardo Godinho

Re: Module Creation

על ידי Darko Miletić בתאריך

That is because at that point Moodle is not doing any checks with regards to file permissions. Just do chmod -R ugo=rX /var/www/moodle and you should be fine.