Moodle development traffic 29/2010
Latest stable version 1.9.9+
There are 4 commits into the stable branch from the last development week (from Tue Jul 20 to Mon Jul 26) ♦ Dan Marsden removed a possibility to open SCORM player in a new browser window manually because it led to problems with communication between the SCO and the server and no grades were reported back (MDL-21333) ♦ Sam Hemelryk fixed HTML rendering issue in quiz module (MDL-20724) ♦ Petr Skoda improved isguestuser() core function which detects if the given user has logged in via “Login as guest” button. Such user has hard-coded username ‘guest’. But in MNet environments, just user name is not enough to uniquely identify user as there may be accounts with the same user name on different MNet peers. Therefore we must check the user’s mnethostid attribute and make sure it is really our local account to prevent reported problems with multiple guest accounts (MDL-22871) ♦ David Mudrak spotted two typos in the assignment module’s recent activity report. These typos accidentally eliminated each other so that the reporting of the recent activity for students in case of separate groups mode could not work but no error or false positive activity were displayed (e5bc356).
Future version Moodle 2.0 Preview 4
There are 284 commits into the main development branch from the last week. The list of Moodle 2.0 release blockers contains 19 unresolved issues. Thanks to our community QA testers, dozens of other issues have been discovered and fixed.
Quotes of the week
“That’s the second time in as many days I have brought up something and Petr has gone and removed it- I’d better watch out what I highlight next!
”
– Mary Cooch discovers dark side of QA testing
May git be with you
While my recent work on MNet remote enrolment services for Moodle 2.0, I could not praise git more. Whenever dealing with some MNet development, one usually has to work on two separate instances of Moodle – server side and client side (aka service provider and service subscriber). This is roughly how I used git during the development. Let us say I have moodle.git clone in my ~/public_html/moodle20 directory. It is the checkout I use for everyday development tasks. I started with creating a new branch at the top of the latest upstream Moodle version. At the end of the day, this branch will contain all the commits to be pushed into Moodle CVS repository.
$ cd ~/public_html/moodle20/ $ git fetch $ git branch mnet-integration origin/cvshead $ git checkout mnet-integration
Then I prepared checkouts for the two clear installations of Moodle. Due to the lack of invention, let us call them A and B.
$ cd ~/public_html/ $ git clone moodle20 moodle20a $ git clone moodle20 moodle20b
Thanks to the new CLI installer in Moodle 2.0, it was not actually needed to leave the pleasant dark shell window.
$ cd ~/public_html/moodle20a/ $ php admin/cli/install.php
And the work could start. After I set up both installations, I connected them into MNet network. Moodle A served as a course with user accounts and Moodle B was the one with courses. Simply said, remote enrolment services allows the administrator at Moodle A to enrol their users into remote courses at Moodle B. To make this work within the new enrolment framework in Moodle 2.0, changes had to be done on both of the sides – service provider (B in our scenario as it is the one with the courses) and service subscriber (A as the one with the users).
After a while, I had several commits in both checkouts. When I had a commit in A that I needed in B too, I just run
$ cd ~/public_html/moodle20b/ $ git fetch ../moodle20a $ git cherry-pick 63891a8
When I finished, it was time to prepare commits to be sent into CVS. I went back to the repository with the integration branch and run
$ cd ~/public_html/moodle20/ $ git fetch ../moodle20a $ gitk HEAD..FETCH_HEAD $ git merge FETCH_HEAD $ git fetch ../moodle20b $ git merge FETCH_HEAD
git is clever enough to know that some commits from moodle20a were already included in moodle20b due to the cherry picking. Now I could go back to A and B and repeat the merging as many time as needed. So I ended with commits log like this. Sorry for different names of branches at the picture against the ones in the text. You can see how branches can be merged here, there and back again.
When I finished and was ready to publish my work, I rebased the integration branch against the up-to-date upstream head. Once the integration branch is rebased, the merging from the cloned branches can not work any more and would lead to conflicts, problems and duplicated commits. I rebased the branch accidentally so I know that git manual is really right about this. Rebasing is actually re-applying a sequence of commits. During the rebasing, commits order can be modified, commits can be meld into single commits etc. This allowed me to prepare a set of patches to be send into CVS using git cvsexportcommit command.
Post scriptum
When in Rome, do as the Romans. When in Moodle, use forums.





July 30th, 2010 at 00:54
[New Post] Moodle development traffic 29/2010 – via #twitoaster http://blog.mudrak.name/2010/07/moodle-d...
July 30th, 2010 at 09:54
Hi David, I love the quote on the Forum Romanum in the end… the rest I just overread
keep the good work going, guys! Cheers!
July 31st, 2010 at 10:54
Hi Sigi. No worries, the thought of forums is the most valuable part in the whole post