I browse to my rd instance, open the webroot and browse to www\moodleinstance\grade\report, there I see the progress plugin created a couple weeks ago. I copy and paste the folder in place and end up with a new directory called progress - copy1.
If you follow the moodle docs on development of plugins, you have a decent roadmap of what needs to be updated. This gradebook reports page describes a similar process.
The highlights are:
1 - Change the name of the copied folder (directory) to something, in my case notgraded.
2 - change the name of the language file in the lang\en folder, adhering to the strict rule for gradebook report plugins like this: gradereport_notgraded.php, where notgraded is the EXACT PRECISE name of the folder.
3 - edit the db\access.php file, changing the capability array to point into your renamed folder, like:
$capabilities = array(
'gradereport/notgraded:view' => array(
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
)
);
4 - Update the version # in the version.php file located in the root of the plugin folder. Increment the last digit, like this:
$plugin->version = 2011112900; to
$plugin->version = 2011112901;
This forces the moodle plugins check to run.
5 - Update the plugin name in the language file, it is used in 4 places in the moodle interface. Like this:
$string['pluginname'] = 'Items Not Graded';
If you did these things correctly, you should see in your gradebook a new option like this:
And that is the *easy part, just so very fickel. Once you have the *shell for the new grade plugin created, now you can set off to complete the actual coding to solve the program, create the report that you intended. This will almost always look like creating or in this case editing the index.php file at the root of the folder and adding your programming there.
I seem to be stuck because Moodle takes me to the plugin update page, and lists my new plugin as "to be installed". So how do I install it? Your instructions - excellent by the way - seem to differ very slightly from what I see. my version.php file looks like:
ReplyDelete$plugin->version = 2012061701; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2012061701; // Requires this Moodle version
$plugin->component = 'gradereport_mailout'; // Full name of the plugin (used for diagnostics)
Is this correct? Thanks. Glen
sorry, missed your comment. Try updating the version # by 1 in the version.php file included in the plugin directory. Moodle should see this and *force the plugin to install.
Delete