Adding bim 2.0 to “CONTRIB”

Next step in the development of bim v2.0 is to start the process of submitting it to CONTRIB. i.e. essentially getting out officially into the Moodle community.

The following is my attempt to figure out and record the process for doing this. This was actually started a couple of months ago but then semester started, a bit of breathing space now and I need to catch up on this.

Evidence of progress

Overall, the process hasn’t been that difficult. A little disjointed in places and between that and my rushing it in places, there may be a few things to fix up. But it’s done.

Will be interesting to observe what happens from here. Beyond responding to that, it’s time to start thinking about further changes to BIM.

Finding the right process

Of course, the background on CONTRIB I linked to above is obsolete. CONTRIB is using git, not CVS anymore (I believe). Time to find where the right process is documented. It’s a bit of an issue when the obsolete documentation on this are what Google is returning as the top hits.

The “Guidelines for contributed code seem more up to date. The process listed – or at least my interpretation – is summarised in the following sections.

Create a git repository

Create a git repository, preferably using the format moodle-{plugintype}_{pluginname}.

This implies I’ll need to rename the existing BIM git repository. I wonder what support git has for this? I discover and implement one approach below.

Forking the existing bim repository might be an option. But not sure I would want to maintain the connection. Can it be renamed? Well apparently there is a feature to do this. That appears to have worked, the question will be what ramifications are discovered into the future. At the very least, I imagine my local clones of bim will need to be updated.

Here’s what I did

git clone https://github.com/djplaner/moodle-mod_bim.git
cd moodle-mod_bim
git checkout bim2
mv moodle-mod_bim bim
# make some changes
git push

All seems to be working. Of course, all the hypertext links on the blog are now broken because of the new repository name. Will have to update a few of those.

Test the code

Make sure the code is tested. Here’s what I’ve done to date

  • A range of testing while under development.
  • Including some testing of BIM under versions 2.4.1, 2.3.4, 2.2.7 and 1.9.19 of Moodle.
  • Thanks to a bug report from a Russian user of BIM solved a problem with 2.3.2 version of Moodle.
  • Been using BIM for my current teaching. Not in a full on way but it’s getting some testing.

Some more work to do

Backup and restore test

Do a backup and restore of the EDC3100 blogs between BIM installs on different versions of Moodle. Doing this from 2.4 to 2.4 as well as 2.3 will also provide me with a decent test space for the issues below and in an on-going way. 300+ students with multiple posts is a much more reasonable foundation for testing. That worked surprisingly easily.

Revisit open issues

Some recent playing with BIM revealed a potential issue, so need to explore that a bit and also look at any of the other immediately open issues that should be addressed before adding the code to CONTRIB.

  • Problem with adding questions and hanging process_unallocated
    With a BIM activity already created with students registered and posts mirrored, it appears that when you add a question, then the function process_unallocated (attempts to decide if any student posts match the question) hangs.

    Recreate the problem. Add a question to a copy of the EDC3100 BIM activity and do the processing thing. And I can’t re-create it. All working as expected. Thinking this may have been due to proxy problems giving the appearance of a problem.

Documentation

Documenting the plugin is important and suggested to be done on the English Moodle docs.

Where would the BIM docs reside? It should be in “the most recent version of Moodle for which the plugin works”. One of the bits of advice for the process is to go into BIM and find where the link for “Moodle docs for this page” points. Which in the case of BIM is here.

Of course, it’s not that simple. It appears this is the proper place to get started http://docs.moodle.org/24/en/BIM_module

What is required of the docs, The stamp collection module is given as an example and the provided list of contents includes:

  • Template code.
  • Features overview.
  • Installation instructions.

Done sufficiently for now, I hope.

Request to be tested

Request that the code be tested/reviewed. Done, at least I think this is what was required.

Add it to the plugins directory

Share the code in the Moodle plugins directory.

Need to create a zip file containing the module that can be installed and tested. Apparently this will do it.
git archive -o ~/Desktop/BIM2.zip –prefix=bim/ bim2

Will need to test that this works ok.

  • Delete BIM from Moodle install.
  • Unzip the zip file created by the above.
  • Go to notifications.
  • Install it.
  • Create a BIM activity.

That seems to work. I do wonder what I’ve missed.

Well, $module->release in version.php appears to be one of those things.

While I am here, might be a good time to update the BIM icon. Moodle 2.x appears to support much larger icons and the image @rolley provided for BIM 1.x doesn’t scale too well. That appears to be a step too far for me.

I’ll leave it at that. It’s been uploaded. Not sure I’ve gotten everything, but it will do for the day.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s