<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Mudrak&#039;s blog &#187; moodle</title>
	<atom:link href="http://blog.mudrak.name/tag/moodle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mudrak.name</link>
	<description>Moodle, Mahara and beer fan</description>
	<lastBuildDate>Fri, 30 Jul 2010 00:54:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Moodle development traffic 29/2010</title>
		<link>http://blog.mudrak.name/2010/07/moodle-development-traffic-292010/</link>
		<comments>http://blog.mudrak.name/2010/07/moodle-development-traffic-292010/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 08:12:05 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=316</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.9+</h3>
<p>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 &#8220;Login as guest&#8221; button. Such user has hard-coded username &#8216;guest&#8217;. 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&#8217;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&#8217;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 (<a href="http://github.com/moodle/moodle/commit/e5bc3566e03cd8d59beda0a2328f1a9364a26c8c">e5bc356</a>).</p>
<h3>Future version Moodle 2.0 Preview 4</h3>
<p>There are 284 commits into the main development branch from the last week. The <a href="http://tracker.moodle.org/secure/IssueNavigator.jspa?mode=hide&amp;requestId=11118">list of Moodle 2.0 release blockers</a> contains 19 unresolved issues. Thanks to our community QA testers, dozens of other issues have been discovered and fixed.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;That&#8217;s the second time in as many days I have brought up something and Petr has gone and removed it- I&#8217;d better watch out what I highlight next! <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> &#8221;<br />
&#8211; <a href="http://moodle.org/mod/forum/discuss.php?d=154273#p675292">Mary Cooch</a> discovers  dark side of QA testing</p></blockquote>
<h3>May git be with you</h3>
<p>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 &#8211; 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.</p>
<pre>$ cd ~/public_html/moodle20/
$ git fetch
$ git branch mnet-integration origin/cvshead
$ git checkout mnet-integration</pre>
<p>Then I prepared checkouts for the two clear installations of Moodle. Due to the lack of invention, let us call them A and B.</p>
<pre>$ cd ~/public_html/
$ git clone moodle20 moodle20a
$ git clone moodle20 moodle20b</pre>
<p>Thanks to the new CLI installer in Moodle 2.0, it was not actually needed to leave the pleasant dark shell window.</p>
<pre>$ cd ~/public_html/moodle20a/
$ php admin/cli/install.php</pre>
<p>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 &#8211; service provider (B in our scenario as it is the one with the courses) and service subscriber (A as the one with the users).</p>
<p>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</p>
<pre>$ cd ~/public_html/moodle20b/
$ git fetch ../moodle20a
$ git cherry-pick 63891a8</pre>
<p>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</p>
<pre>$ cd ~/public_html/moodle20/
$ git fetch ../moodle20a
$ gitk HEAD..FETCH_HEAD
$ git merge FETCH_HEAD
$ git fetch ../moodle20b
$ git merge FETCH_HEAD</pre>
<p>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.</p>
<p><a href="http://blog.mudrak.name/wp-content/uploads/2010/07/git-enrol-pre-rebase1.png"><img class="aligncenter size-medium wp-image-321" title="Visualised structure of commits after the merging into the integration branch" src="http://blog.mudrak.name/wp-content/uploads/2010/07/git-enrol-pre-rebase1-300x217.png" alt="" width="300" height="217" /></a></p>
<p>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.</p>
<h3><a href="http://blog.mudrak.name/wp-content/uploads/2010/07/post-rebase.png"><img class="aligncenter size-medium wp-image-323" title="Set of patches after interactive rebasing" src="http://blog.mudrak.name/wp-content/uploads/2010/07/post-rebase-300x123.png" alt="" width="300" height="123" /></a></h3>
<h3>Post scriptum</h3>
<p>When in Rome, do as the Romans. When in Moodle, use forums.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/07/moodle-development-traffic-292010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 25/2010</title>
		<link>http://blog.mudrak.name/2010/07/moodle-development-traffic-252010/</link>
		<comments>http://blog.mudrak.name/2010/07/moodle-development-traffic-252010/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 10:31:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=306</guid>
		<description><![CDATA[Latest stable version 1.9.9+
There are 17 commits into the stable branch from the last development week. Tim Hunt fixed problem with deleting quiz attempts, occurring in quizzes in group mode with a group currently selected (MDL-22847) and two other issues in quiz. Dan Marsden and Piers Harding backported a series of patches from Moodle 2.0. [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.9+</h3>
<p>There are 17 commits into the stable branch from the last development week. Tim Hunt fixed problem with deleting quiz attempts, occurring in quizzes in group mode with a group currently selected (MDL-22847) and two other issues in quiz. Dan Marsden and Piers Harding backported a series of patches from Moodle 2.0. That patches fix various issues in SCORM module (MDL-22332, MDL-22340, MDL-22168, MDL-21333, MDL-17891, MDL-21551, MDL-22741, MDL-21492, MDL-21761, MDL-12834 and MDL-21306).</p>
<h3>Future version Moodle 2.0 Preview 3</h3>
<p>There were 159 commits into the main development branch in the last week. Microsoft contributed native SQL*Server adapter for their new SQL Server PHP driver (sqlsrv). PHP extension XML-RPC become required for Moodle 2.0 and the prerequisite was set in admin/environment.xml. Moodle uses XML-RPC extension for hub communication, web services and Moodle networking (MNet). There are already <a href="http://moodle.org/mod/forum/discuss.php?d=153278">first reports</a> from the community that this will be issue with some cheaper web hosting providers and even some core developers are not quite sure about this step, so the decision may not be final yet. On the other hand, Moodle is not trivial application and one should not expect it runs just everywhere (just because of memory requirements, at least).</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Loan calculator 2.0! Now with extra mortgage sales! Order now and get 2 licenses of Moodle 2.0 for free.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=5133#c207410">David Mudrak</a> can&#8217;t believe the Loan calculator block still survives in standard Moodle distribution</p></blockquote>
<blockquote><p>&#8220;Eventually there will be unicorns and rainbows and everyone gets a pony.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=5145#c207765">Sam Marshall</a> dreaming about the future when developers would be happy with how Internet Explorer renders Moodle 2.0 pages</p></blockquote>
<h3>Cleaning user input</h3>
<p>Sanitizing data inserted by users is a must. Without proper cleaning, data submitted by users could break database integrity or contain SQL injection (and it is not just about hackers, <a href="http://moodle.org/mod/forum/discuss.php?d=97255#p429550">parents are malicious</a>, too). In Moodle, there are two basic functions that every developer MUST use before processing user input. These are required_param() or optional_param(). They both use clean_param() to make sure that the script does not get unwanted values. Developer declares what type the parameter is &#8211; for example PARAM_INT for integers, PARAM_BOOL for booleans, PARAM_FILE for safe file name etc. See the top of lib/moodlelib.php for the comprehensive list of them.<br />
In most of cases, clean_param() just uses regular expressions to get rid of invalid characters. Sometimes it returns the original value without the dangerous parts (as in PARAM_ALPHANUM, for example) and sometimes it returns empty value if the parameter does not fit the conditions (as in PARAM_URL that either returns the original value if it is ok, or nothing).<br />
In some cases, just formal syntax check is not enough. For example PARAM_LANG not only checks that the provided value is safe name of the language pack directory (by checking it against PARAM_SAFEDIR internally) but also checks that the given language is actually installed at the site. The same applies to PARAM_CAPABILITY, PARAM_AUTH or PARAM_THEME. As I realized recently (thanks to one of quite frequent discussions with Petr Škoda), this sort of checks must be implemented with extra care and security risks analysis. If clean_param() calls other core functions, we must know exactly what is happening with the value itself during its clean-up, especially when we rely on 3rd party libraries. The point is that parameters are usually checked before the script calls require_login() so that we do not know much about the current user&#8217;s rights yet. Therefore, parameter handling functions are potential doors into Moodle core system for anonymous users. Simple checks based on formal syntax rules are generally safer as they keep the request &#8220;ante portas&#8221; and additional validation can be done later during the script execution, for example when we already know who the user is, what capabilities she/he has, if the combination of all parameters is valid (like the submission, assessment, course module and the course must match).</p>
<h3>Post scriptum</h3>
<p>Moodle 2.0 translation portal http://lang.moodle.org is up and running in production mode now, language pack maintainers can start translate Moodle 2.0 now. Thank you all for being patient.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/07/moodle-development-traffic-252010/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 24/2010</title>
		<link>http://blog.mudrak.name/2010/06/moodle-development-traffic-242010/</link>
		<comments>http://blog.mudrak.name/2010/06/moodle-development-traffic-242010/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 23:03:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[enrolments]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=301</guid>
		<description><![CDATA[Latest stable version 1.9.9+
There are 5 trivial commits into the stable branch from the last development week (from Tuesday Jun 15 to Monday Jun 21). David Mudrák (also known as &#8220;I&#8221; in this blog  ) fixed coding error producing PHP notice and improved a check of user context existence in the list of users [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.9+</h3>
<p>There are 5 trivial commits into the stable branch from the last development week (from Tuesday Jun 15 to Monday Jun 21). David Mudrák (also known as &#8220;I&#8221; in this blog <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) fixed coding error producing PHP notice and improved a check of user context existence in the list of users (c36671d). Helen Foster fixed spelling typo in a Quiz help file, spotted by Stuart Mealor (MDL-22842). Tim Hunt fixed several broken $Id$ CVS tags.</p>
<h3>Future version Moodle 2.0 Preview 3</h3>
<p>There are 69 commits into the main development branch from the last week. The highlighted one for this week is Sam Hemelryk&#8217;s one which adds a new element &#8211; colour picker &#8211; available for administrator config screens (MDL-22806).</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Gentlemen, we have reached a milestone. The download is exactly 1,000,000 bytes. Now we have to get it in the right order.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=5091#c206336">Martin Dougiamas</a> knows the secret of sofware engineering</p></blockquote>
<blockquote><p>&#8220;We do not need any new API for fetching of course record &#8211; we have DML with MUST_EXIST flag which is the right way now; we should not include course/lib.php on each page anyway.&#8221;<br />
&#8211; <a href="http://github.com/moodle/moodle/commit/1b048629bcacd847d212e443ca5176afb0918d2e">Petr Škoda</a> removed get_course_by_id(), get_course_by_idnumber() and get_course_by_shortname() from course/lib.php</p></blockquote>
<h3>Good morning, students, and welcome to the course</h3>
<p>On Monday, Petr Škoda committed the enrolments patch he was working on recently. The patch is quite huge &#8211; it touches 225 files, removes 7603 lines of code and inserts 11019 lines. You can see the changes nicely <a href="http://github.com/moodle/moodle/commit/df997f841f93d676d782a46cfb8547ebc7319102">at github</a>. This patch was one of the last significant things to be included in Moodle 2.0 release so let us have a closer look at it.<br />
Shortly said, the patch changes the enrolment implementation &#8211; that is where and how the information about the users participation in courses is kept. In old Moodle versions (up to 1.6) there used to be two database tables to hold the enrolment information &#8211; user_teachers and user_students. Each of these two tables represented a relationship with M:N cardinality between the table user and the table course, with some additional information (the start and end date of the enrolment etc). When Roles and capabilities were introduced in Moodle 1.7, these tables were dropped and the capability <a href="http://docs.moodle.org/en/Capabilities/moodle/course:view">moodle/course:view</a> started to control if the user is allowed to participate in the course.<br />
Subsequently, it become clear that the implementation based purely on capabilities is not enough in some real scenarios.</p>
<ul>
<li>There is a conceptual difference between &#8220;view the course&#8221; and &#8220;be seen as a course participant&#8221;. For example, you want to let school Inspectors to enter the course but nobody should be able to know about them. Therefore, hidden role assignments had to be introduced.</li>
<li>With the capability, it is pretty difficult &#8211; but not impossible &#8211; to manually order teachers names at the course information page (you know &#8211; all teachers in the course are equal, but some of them are more equal than others).</li>
<li>Many enrolment related information are kept in the course table and therefore must be shared by all enrolment plugins &#8211; for example the start/end dates of the enrolment availability, course cost, enrolment key etc.</li>
<li>Enrolments are not manageable with system-level groups of users.</li>
<li>Moodle should support common tasks like enrolling students in advance (so that the administrator can prepare the winter term enrolments during the summer), the enrolment can be temporarily disabled for the student or students should be given read-only access to the course after it has finished. These things are kind of doable in Moodle 1.x, though one could expect quite cleaner and more straight procedures from LMS.</li>
</ul>
<p>Petr tried to deal with these and many other issues by re-designing the internal enrolment system. In fact, Moodle 2.0 did a small step back to pre-1.7 enrolment ages and now there is again a table to hold the list of all course participants &#8211; user_enrolments. This table holds the list of all users that participate in a given course &#8211; that is they should be listed as course participants (in most cases, these are good old teachers and students). The enrolment record has its state flag &#8211; at the moment it can be ENROL_USER_ACTIVE or ENROL_USER_SUSPENDED. See is_enrolled() function for details.<br />
It must be said that the enrolment itself does not give the user any other privilege but to open the course home page. To submit assignments, post into forums or take a quiz, the user must have appropriate role assigned. Both edge cases are valid &#8211; enrolled user without any role (for example a student who finished the course or the learner with outdated subscription) and a user with a permission to visit the course without being considered as enrolled (for example the school headmaster or an inspector from the <a href="http://wiki.newspeakdictionary.com/wiki/Ministry_of_Truth">Minitrue</a>). From the UI perspective, the users from user_enrolments table are called Participants or Enrolled users. The users without the record in the table who have the capability moodle/course:view (typically administrators, managers, inspectors etc) are called Other users.<br />
Yet another big change is that enrolment plugins (that is manual enrolment, LDAP based enrolment, External database, PayPal etc.) now have instances in all courses they are used. All instances of enrolment plugins are registered in the table enrol. This table now contains columns that used to be in the table course. Therefore, every enrolment plugin instance can have its own configuration &#8211; like enrolment key, dates, expiry notification settings etc. The database table user_enrolments links the given user with the enrolment plugin instance (which in turn is linked with a course). Every instance is allowed to modify just own data &#8211; this helps to prevent situations like when a teacher manually unenrolled a student who was enrolled by an external system and the student got enrolled again during the next synchronisation. This is not allowed any more &#8211; one plugin can not modify data of an other one.<br />
From the developer point of view, it is nice that you can get course participants again at SQL level (this was not possible before due to complex permissions algebra). This may rapidly increase the performance of some parts of Moodle.</p>
<h3>Post scriptum</h3>
<p>My lovely wife won <a href="http://www.kentoya.cz/fck_userfiles/file/Apachestribrnylevybok.jpg">a motor scooter</a> in SMS contest! I may become 50 km/hour pirate of the roads. Yahgrr!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/06/moodle-development-traffic-242010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 23/2010</title>
		<link>http://blog.mudrak.name/2010/06/moodle-development-traffic-232010/</link>
		<comments>http://blog.mudrak.name/2010/06/moodle-development-traffic-232010/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 10:02:51 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=297</guid>
		<description><![CDATA[Latest stable version 1.9.9+
There were 5 commits into the stable branch in the last development week (from Tuesday Jun 8 to Monday Jun 14). Martin Dougiamas bumped the version to 1.9.9 and fixed a potential memory overflow problem occurring during the activity import when a teacher is enrolled in many courses (MDL-19880). This fix caused [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.9+</h3>
<p>There were 5 commits into the stable branch in the last development week (from Tuesday Jun 8 to Monday Jun 14). Martin Dougiamas bumped the version to 1.9.9 and fixed a potential memory overflow problem occurring during the activity import when a teacher is enrolled in many courses (MDL-19880). This fix caused a regression, spotted and patched by Alan Trick and committed by Eloy Lafuente (MDL-22740). Tim Hunt committed patch provided by Vadim Dvorovenko, fixing a typo causing breakage of the questions restore process (MDL-22720). Gordon Bateson committed a patch submitted by Ramon Eixarch, fixing questions import problem in case of Hotpot format JMatch and JMix (MDL-22726).<br />
Security announcements for Moodle 1.9.9 were published yesterday at <a href="http://moodle.org/security/">our MSA page</a>. Moodle 1.9.9 fixes four security problems, two of them are considered critical and one of them major. Registered administrators were notified and encouraged to upgrade their sites before the detailed description of these issues was published, see <a href="http://docs.moodle.org/en/Moodle_security_procedures">Moodle security procedures</a> for details.</p>
<h3>Future version Moodle 2.0 Preview 3</h3>
<p>There were 76 commits into the main development branch during the last week. Repository plugins mahara and remotemoodle were moved from standard distribution into contrib.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Oh dear I&#8217;m a geek. New neighbours move into the next flat while their extension&#8217;s built. How do I welcome them? Let them connect to my wifi&#8221;<br />
&#8211; <a href="http://twitter.com/tim_hunt/status/16177089606">Tim Hunt</a></p></blockquote>
<blockquote><p>&#8220;Only people that truly hate PHP can program something with it. The others who love it are not programmers <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> &#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=5072#c205893">Petr Škoda</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/06/moodle-development-traffic-232010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 22/2010</title>
		<link>http://blog.mudrak.name/2010/06/moodle-development-traffic-222010/</link>
		<comments>http://blog.mudrak.name/2010/06/moodle-development-traffic-222010/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 22:58:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[moot]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=292</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 7 commits into the stable branch from the last development week. Most of them are just final cherries before the upcoming 1.9.9 release. Sam Hemelryk patched HTMLPurify library so that it does not normalise line breaks into \n. It seems that some text comparison checks are broken due to this [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 7 commits into the stable branch from the last development week. Most of them are just final cherries before the upcoming 1.9.9 release. Sam Hemelryk patched HTMLPurify library so that it does not normalise line breaks into \n. It seems that some text comparison checks are broken due to this operation done by PARAM_TEXT or PARAM_CLEAN (MDL-22654). I have committed Tim Lock&#8217;s patch that fixes SQL error in the Recent activity block caused by Workshop 1.x code at recent PostgreSQL servers (MDL-22448). Petr Škoda fixed a critical bug in setnew_password_and_mail() function, spotted by Tim Hunt. The function did not salt the password with hash_internal_user_password() when it was storing the newly generated one into the database.</p>
<h3>Future version Moodle 2.0 Preview 3</h3>
<p>There are 77 commits into the main development branch from the last week. We are tuning the code for the beta release. To highlight one issue for this week, Dongsheng Cai is converting all remaining legacy file upload forms into the new File+Repository APIs (MDL-22574), including bulk user imports, outcomes import, questions import etc. </p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Writing proper documentation is part of the development task. Just throwing random code into CVS then abandoning it is not good enough. Particularly with a core library. The work is not finished until there are full PHPdoc comments, and an overview on Moodle Docs in my opinion.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4978#c202937">Tim Hunt</a> discussing File API with Petr Škoda</p></blockquote>
<blockquote><p>&#8220;At least the file code seems to work, it is better than long spec with tons of docs and rubbish code that can not work <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4978#c202940">Petr Škoda</a> discussing File API with Tim Hunt</p></blockquote>
<h3>Do not include JavaScript too early</h3>
<p>In Moodle 2.0 there is a new framework for including JavaScript code. Thanks to a bug reported by Miquel Escarrà (MDL-22651), I have realized kind of malicious aspect of the system. If developers requires a JavaScript module for page in a course context, they must do so after the current $PAGE was informed about the course. During the initial script setup, global variable $COURSE is set to the site course (front page) by default and it is re-set to the current course later, typically by calling require_login() which in turn calls $PAGE->set_course(). During the JS module registration, all needed strings are fetched by string_for_js() method of page_requirements_manager (accessed via magical $PAGE->requires). The problem is that the course may have set a forced language which overrides the currently selected language in the session. Therefore, if JS module is registered too early (before the $PAGE knowns the forced language), the strings are different than they should be: they are obtained from the language pack set in the current session and not from the language forced by the course. If the same string is fetched again (by another module, for example) later during the PHP script execution, when the forced language is already known, string_for_js() throws coding exception. Which is good because we want to know we did something wrong.<br />
This sort of bugs are quite difficult to reproduce as they emerge in a very specific situation and environment. In this case, it helped that the reporter provided detailed description of his steps leading to the error.</p>
<h3>Post scriptum</h3>
<p>I am looking forward the Czech MoodleMoot 2010 in Brno later this week. @mootcz10 #mootcz10</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/06/moodle-development-traffic-222010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 21/2010</title>
		<link>http://blog.mudrak.name/2010/06/moodle-development-traffic-212010/</link>
		<comments>http://blog.mudrak.name/2010/06/moodle-development-traffic-212010/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 22:01:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=287</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 4 commits into the stable branch from the last week. I added an empty string &#8216;parentlanguage&#8217; into English langconfig, because as a general rule, every string must be defined in English pack first (MDL-22575). The fact that parentlanguage was not defined required hard coded exceptions in the new translation system. [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 4 commits into the stable branch from the last week. I added an empty string &#8216;parentlanguage&#8217; into English langconfig, because as a general rule, every string must be defined in English pack first (MDL-22575). The fact that parentlanguage was not defined required hard coded exceptions in the new translation system. And I do not like exceptions. However, this change introduced a regression &#8211; language import utility tried to fetch the parent language for English. Fortunately Eloy spotted and fixed it promptly (MDL-22585). Yet another regression, caused by the recent patch in the Assignment module, was fixed by Petr Škoda (MDL-22181).</p>
<h3>Future version Moodle 2.0 Preview 3</h3>
<p>There are 160 commits into the main development branch from the last development week. On Monday, the branch was tagged as Preview 3. Sam Hemelryk rewrote the blocks docking mechanism significantly (MDL-22560). In the new version, there is now better support for themes. The performance was improved. Docking mechanism is not completely based on YUI3.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;2.0 is getting fun to use now. Just need the last 90% of effort to finish the remaining 10% features.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4929#c201665">Martin Dougiamas</a></p></blockquote>
<h3>Post scriptum</h3>
<p>My Linux machine uses two-state logic. Either it rocks, or it sucks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/06/moodle-development-traffic-212010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 20/2010</title>
		<link>http://blog.mudrak.name/2010/05/moodle-development-traffic-202010/</link>
		<comments>http://blog.mudrak.name/2010/05/moodle-development-traffic-202010/#comments</comments>
		<pubDate>Wed, 26 May 2010 09:31:58 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=275</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 4 commits into the stable branch from the last development week. Sam Marshall fixed an accessibility issue, preventing IE users from navigating the page with keyboard (MDL-22518).  Martin Dougiamas fixed the cases when getremoteaddr() returned NULL because the script was executed via CLI. The empty value violated the non-null [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 4 commits into the stable branch from the last development week. Sam Marshall fixed an accessibility issue, preventing IE users from navigating the page with keyboard (MDL-22518).  Martin Dougiamas fixed the cases when getremoteaddr() returned NULL because the script was executed via CLI. The empty value violated the non-null constraint on lastip in user table and some scipts (for example LDAP authentication plugin) could not create new user accounts (MDL-19628). Petr Škoda committed Ye Chen&#8217;s patch that fixes critical bug in get_users_by_capability(). The symptoms of the bug include &#8220;No users were found with permissions to submit this assignment&#8221; in case of an assignment in group mode. HTML purifier has been upgraded to the version 4.1 and is available as an experimental feature for PHP5 servers.</p>
<h3>Future version Moodle 2.0 Preview 2</h3>
<p>There are 281 commits into the future release branch from the last week. Among many other improvements, the function get_string() now uses on disk cache to store the result of merging of standard language pack with the local customization and parent languages. Included YUI libraries have been upgraded to 3.1.1 and 2.8.1. The rotation of the vertical text (also known as the book spin) can be configured via string &#8220;thisdirectionvertical&#8221; in langconfig.php.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Tracker going down for restart, java needs it monthly kick in the ass&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4869#c199021">Jordan Tomkinson</a> knows how to keep our servers up and running</p></blockquote>
<blockquote><p>&#8220;Going to commit patch which removes dirroot from config.php, yay!&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4894#c200098">Petr Škoda</a> is always happy when he is cleaning up Moodle source code</p></blockquote>
<h3>New Moodle development books</h3>
<p>I like IT books and have dozen or two of them on the shelf in the office. I usually do not read most of them, though. Especially those just copying online documentation and manual pages. It is quite interesting trend that computer books have usually hundreds of pages while the real added valuable information could be compressed to five of ten pages of text. But the shelf full of thick computer books gives an impression that the guy really knows what he is talking about when asking you to turn it off and on again <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Given that, I appreciate books that offer more than you can find online in API documentation. And I guess <a href="https://www.packtpub.com/moodle-1-9-extension-development/book">the new book on Moodle 1.9 development</a> by Mike Churchward and Jonathan Moore from Remote Learner (U.S. and Canada Moodle Partner) can be the case. It was released by Packt Publishing together with <a href="https://www.packtpub.com/moodle-1-9-theme-design-beginners-guide/book">yet another one<a/> by Paul James Gadsdon, dealing with Moodle custom themes development.<br />
I have ordered both of them and am looking forward to see how they are written. According the sample chapters available, they look as promising guides and tutorials on the subject. Shall be noted that by buying <a href="http://moodle.org/mod/data/view.php?id=7246">Moodle books</a>, you help support Moodle development as a percentage of all sales goes to the Moodle Trust.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/05/moodle-development-traffic-202010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 19/2010</title>
		<link>http://blog.mudrak.name/2010/05/moodle-development-traffic-192010/</link>
		<comments>http://blog.mudrak.name/2010/05/moodle-development-traffic-192010/#comments</comments>
		<pubDate>Tue, 18 May 2010 21:55:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=267</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 4 commits into the stable branch from the last development week. Tim Hunt fixed a wrong capability checking in Quiz module (MDL-22410) and several regressions in clean_param(), introduced when we were converting ereg to preg, because ereg functions are deprecated in PHP 5.3 (MDL-19418).
Martin Dougiamas committed a bunch of patches [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 4 commits into the stable branch from the last development week. Tim Hunt fixed a wrong capability checking in Quiz module (MDL-22410) and several regressions in clean_param(), introduced when we were converting ereg to preg, because ereg functions are deprecated in PHP 5.3 (MDL-19418).<br />
Martin Dougiamas committed a bunch of patches that kills the scripts expected to be included only, if they are called directly via URL (MDL-22388). During the initial setup of every script life time, Moodle core defines constant MOODLE_INTERNAL which shall be used to make sure that the script is included and not called directly (constants can&#8217;t be defined via URL even with bloody register_globals on). This trick helps to prevent libraries, forms definitions and other scripts from potential security holes. My mom told me not to talk to strangers so I personally prefer silent one-line check</p>
<pre>defined('MOODLE_INTERNAL') || die();</pre>
<p>instead of explaining the poor hacker that the direct access to the script is forbidden (Mahara uses this shorter form and I just like it).<br />
Gordon Bateson found a way how to deal with an XHTML issue in Hotpot by using IFRAME instead of OBJECT for Internet Explorer, as HTML forms are not able to escape OBJECT in this browser.</p>
<h3>Future version Moodle 2.0 Preview 2</h3>
<p>There are 141 commits into the future release branch from the last week. It is now tagged as Preview 2. Since Preview 1, there are <a href="http://docs.moodle.org/en/Moodle_2.0_Preview_2_release_notes">many improvements and bug fixes</a>. Many thanks to all who help us with testing.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Ha, some song just came on my radio station by a band called CSS. The song is called CSS Suxxx. Just when I was swearing at css&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4857#c198563">Martin Dougiamas</a> experiences <a href="http://en.wikipedia.org/wiki/Nagualism_(Carlos_Castaneda)#cite_ref-13">reaffirmation from the world</a></p></blockquote>
<h3>Watch your back!</h3>
<p>Backup and restore support used to be my not very favourite part of Moodle modules coding. I was kind of scared (and bored) by all those direct fwrite() calls to generate XML representation of the module data. With the new backup/restore framework, written by Eloy Lafuente, this is not true any more! Eloy has prepared really well designed system that deals with a lot of tasks automatically, yet in a flexible way. Following his <a href="http://docs.moodle.org/en/Development:Backup_2.0">tutorial on backup support for Moodle 2.0 activity modules</a>,  I was able to quickly hack a working prototype of Workshop backups.<br />
What I like the most so far is the way how module just defines a description of its database structure and lets the core to actually fetch the data a convert them into XML representation. Given the necessary amount of information, new backup system is able to &#8220;automagically&#8221; handle all relations, references to other tables and including embedded files (only those really needed by the module, of course!).<br />
There are still parts to finish both in Moodle core and in modules &#8211; most notably the ability to backup subplugins information and to restore 1.9 backups. But I can sleep well again as backup and restore is not nightmare any more for module developers.</p>
<h3>Post scriptum</h3>
<p>After more than eight years, one of the characteristic symbols of Moodle, the default user icon (yes, that very well known smiley cake), was replaced by a bland avatar for the standard theme in Moodle 2.0. That is ironic that the smiley actually <a href="http://cvs.moodle.org/moodle/user/default/f1.jpg?revision=1.2&amp;view=markup&amp;pathrev=MOODLE_19_STABLE">replaced</a> the original &#8220;<a href="http://cvs.moodle.org/moodle/user/default/f1.jpg?revision=1.1&amp;view=markup&amp;pathrev=MOODLE_19_STABLE">shadowhead</a> with something a bit more positive&#8221;. The story of the &#8220;f1.jpg&#8221; image and how it resisted various attempts to replace it is <a href="http://cvs.moodle.org/moodle/pix/u/f1.png?revision=1.4&amp;view=markup&amp;pathrev=MOODLE_19_STABLE">sometimes quite interesting</a>. Anyway, I will miss it&#8230; So long!</p>
<p style="text-align: center;"><a href="http://blog.mudrak.name/wp-content/uploads/2010/05/f1.png"><img class="aligncenter size-full wp-image-269" title="Smiley cake" src="http://blog.mudrak.name/wp-content/uploads/2010/05/f1.png" alt="" width="100" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/05/moodle-development-traffic-192010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 18/2010</title>
		<link>http://blog.mudrak.name/2010/05/moodle-development-traffic-182010/</link>
		<comments>http://blog.mudrak.name/2010/05/moodle-development-traffic-182010/#comments</comments>
		<pubDate>Tue, 11 May 2010 21:55:45 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=258</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 4 commits into the stable branch from the last development week. Dan Marsden fixed a bug in SCORM backup/restore (MDL-22301) and yet another one which was caused by not using absolute file paths when including a PHP file (MDL-22340). In Moodle, the best way to include other files (typically libraries [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 4 commits into the stable branch from the last development week. Dan Marsden fixed a bug in SCORM backup/restore (MDL-22301) and yet another one which was caused by not using absolute file paths when including a PHP file (MDL-22340). In Moodle, the best way to include other files (typically libraries or forms definitions) is to include the main config.php via dirname(__FILE__) and then include all other files needed via their full path, using $CFG-&gt;dirroot or $CFG-&gt;libdir.<br />
Eloy Lafuente updated the timezones database shipped with Moodle to version tzdata2010i (MDL-18576). This database contains information about the world&#8217;s time zones and daylight saving time and helps our in-built calendar to calculate correct dates and times for users from all around the world. Moodle uses so called <a href="http://en.wikipedia.org/wiki/Tz_database">Olson database</a>, a public-domain collaborative compilation of timezones data, currently maintained by Paul Eggert.<br />
Pierre Pichet committed a patch fixing buggy behaviour of calculated question type on duplicate (save as new question).</p>
<h3>Future version Moodle 2.0 Preview 1</h3>
<p>There are 158 commits into the future release  branch from the last week. On Thursday, Martin Dougiamas <a href="http://moodle.org/mod/forum/discuss.php?d=149513">announced</a> the release of Moodle 2.0 Preview 1 version, the first milestone on about 10 weeks long track to reach final Moodle 2.0. See the <a href="http://docs.moodle.org/en/Moodle_2.0_Preview_1_release_notes">preview release notes</a> for more information.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;It is a good idea, so I put it in the tracker. The point of the tracker is that it remembers things, so we can forget about them.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4760#c195056">Tim Hunt</a> on tracker.moodle.org</p></blockquote>
<blockquote><p>&#8220;I&#8217;m really looking forward to 2.1 and working on modules again.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/cvsadmin/view.php?conversationid=4763#c195407">Martin Dougiamas</a> knows that many of improvements in 2.0 lie in the dark deep of Moodle architecture internals and are never to be actually seen by users</p></blockquote>
<h3>Installing Moodle from the command line</h3>
<p>I love Linux for many reasons and not only because it is free as in being free after drinking beer. Since the first days with Linux, I&#8217;ve been impressed by the power of command line utilities, following the <a href="http://en.wikipedia.org/wiki/Unix_philosophy">Unix philosophy</a> of doing just one thing, doing it well and cooperating with other small programs. From version 2.0, Moodle supports installation and upgrades from the command line. Of course I was happy I could spend some time on improving these routines a bit.<br />
CLI programs for common administration tasks (installation, upgrade, switching the maintenance mode and resetting a forgotten user password are supported at the moment) can be found in admin/cli/ directory of standard Moodle 2.0 source code. You should run them as the same user as is used for the webserver process (apache or wwwrun are used usually).<br />
This is an example of how I installed a fresh Moodle 2.0 at my notebook today:</p>
<pre>$ php admin/cli/install.php --lang=en
--wwwroot=http://localhost/moodle20
--dataroot=/var/www/moodledata/moodle20
--dbname=moodle20 --dbuser=apache
--dbpass=xxxxxx --dbsocket</pre>
<p>In this example, the script runs in an interactive mode, asking for all needed data and using the provided ones as default. There is also a possibility to execute the script in non-interactive mode, providing all required information as CLI parameters. Such an option may be interesting for hosting providers as it allows to automate the process of creating a new Moodle site.</p>
<h3>Post scriptum</h3>
<p><a href="http://www.projectcartoon.com/cartoon/1">http://www.projectcartoon.com/cartoon/1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/05/moodle-development-traffic-182010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moodle development traffic 17/2010</title>
		<link>http://blog.mudrak.name/2010/05/moodle-development-traffic-172010/</link>
		<comments>http://blog.mudrak.name/2010/05/moodle-development-traffic-172010/#comments</comments>
		<pubDate>Tue, 04 May 2010 20:51:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mahara]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=252</guid>
		<description><![CDATA[Latest stable version 1.9.8+
There are 10 commits into the stable branch from the last week. Half of them, committed by Dan Marsden, deal with various SCORM issues (MDL-22168, MDL-22046, MDL-21568, MDL-18202, MDL-21444). Tim Hunt fixed three Quiz issues (MDL-22241, MDL-20586, MDL-22257). Thanks to Gordon Bateson, Hotpot module now uses HTML OBJECT tag instead of IFRAME, [...]]]></description>
			<content:encoded><![CDATA[<h3>Latest stable version 1.9.8+</h3>
<p>There are 10 commits into the stable branch from the last week. Half of them, committed by Dan Marsden, deal with various SCORM issues (MDL-22168, MDL-22046, MDL-21568, MDL-18202, MDL-21444). Tim Hunt fixed three Quiz issues (MDL-22241, MDL-20586, MDL-22257). Thanks to Gordon Bateson, Hotpot module now uses HTML OBJECT tag instead of IFRAME, due to XHTML 1.0 strict compatibility (MDL-17702).</p>
<h3>Unstable development version 2.0dev</h3>
<p>Total of 294 commits found their way into the future version branch last week. Several various subsystems and major patches were included &#8211; for example the new My home page, Moodle Hubs support and many others. Petr Škoda&#8217;s recent patch, that reimplements the whole enrolment subsystem and changes some of the key concepts of roles and their assignments, is still being reviewed in a separate branch. Martin Dougiamas is going to announce the release of Moodle 2.0 &#8211; Preview 1 version, just working on the release notes yet.</p>
<h3>Quotes of the week</h3>
<blockquote><p>&#8220;Users will remember for almost forever a bad/broken release; but will quickly forget that a stable/fine/working release was a year late.&#8221;<br />
&#8211; <a href="http://moodle.org/mod/forum/discuss.php?d=145632#p653186">Greg Mushial</a> summarizes his experience from 40+ years involved in software development</p></blockquote>
<blockquote><p>&#8220;Beta version software is likely to be useful for internal demonstrations and previews to select customers. Some developers refer to this stage as a preview, a prototype, a technical preview (TP) or as an early access.&#8221;<br />
&#8211; <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Beta">Wikipedia</a>, <em>Software release life cycle</em></p></blockquote>
<h3>Help tooltips in Moodle 2.0</h3>
<p>Among many other (and definitely more significant and more important) improvements in Moodle 2.0, there is a new way how the help tooltips are handled. From the users&#8217; point of view, help is still available via those question mark icons. Instead of opening a pop-up window in the browser, Moodle 2.0 uses YUI3 overlay to display a &#8220;bubble&#8221; with the help text. The behaviour of the tooltip had been a subject of a discussion (MDL-22067) and at the end, it was decided to follow the functionality found in Mahara or Github.</p>
<p>From the developer&#8217;s point of view, help texts are not stored in separate files any more. In the dark past, help files used to play a role of inline help, documentation, manuals or even tutorials on using Moodle. Nowadays, with Moodle Documentation portal being actively growing thanks the community contributions, we are trying to revert helps to what they are supposed to be &#8211; useful hints on various user interface elements, their meaning and usage. Therefore, the help files are being migrated into proper Moodle strings in 2.0.</p>
<p>For every help, two strings must be defined. One for the label of the thing the help is describing. In the forms, this is the label of the input element in almost all cases. The second string is the help text itself. The identifier of the second string must be the same as the identifier of the first one, just with &#8220;_help&#8221; suffix, for example:</p>
<pre>$string['subject'] = 'Subject';
$string['subject_help'] = 'Message subject will be used as a title at the message view page.';</pre>
<p>Let us say we want to add such help in a Moodle form, for &#8216;msgsubject&#8217; input field. You would probably have a code like:</p>
<pre>$mform-&gt;addElement('text', 'msgsubject', get_string('subject', 'mymodule'));
$mform-&gt;addHelpButton('msgsubject', 'subject', 'mymodule');</pre>
<p>That would use the string &#8217;subject&#8217; defined in your &#8216;mymodule&#8217; language file as a title of the help and the string &#8217;subject_help&#8217; defined in the same file as the help text. To get the same result in Moodle 1.9, you would have the help defined in a HTML file, let us say help/messagesubject.html a the code in the form would look like:</p>
<pre>$mform-&gt;setHelpButton('msgsubject', array('messagesubject', get_string('subject', 'mymodule'), 'mymodule');</pre>
<p>To display a standalone help icon anywhere at your page, use help_icon() method of the core renderer instance:</p>
<pre>echo $OUTPUT-&gt;help_icon('subject', 'mymodule');
</pre>
<p>Help strings can use Markdown syntax for basic HTML formatting. We use that just for producing bullet list from the lines starting with asterisk.</p>
<p>To give the translators something to start with instead of rewriting all help strings from scratch, we are copying the contents of the translated help files into new help strings wherever it is possible.</p>
<h3>Post scriptum</h3>
<p>I can&#8217;t think of anything to write here today <img src='http://blog.mudrak.name/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2010/05/moodle-development-traffic-172010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
