<?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>Petr Škoda (skodak) &#187; Moodle</title>
	<atom:link href="http://skodak.org/blog/?feed=rss2&#038;cat=3" rel="self" type="application/rss+xml" />
	<link>http://skodak.org/blog</link>
	<description>Independent Software Developer</description>
	<lastBuildDate>Thu, 22 Nov 2012 21:17:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>PHPUnit via Composer in Moodle 2.4</title>
		<link>http://skodak.org/blog/?p=67</link>
		<comments>http://skodak.org/blog/?p=67#comments</comments>
		<pubDate>Thu, 22 Nov 2012 21:17:08 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>
		<category><![CDATA[Composer]]></category>
		<category><![CDATA[PHPUnit]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=67</guid>
		<description><![CDATA[Starting in Moodle 2.4 the recommended way to install PHPUnit for Moodle testing is via Composer dependency manager. Benefits compared to old-style PEAR installations much easier installation local installation in Moodle dirroot safe and easy upgrades Installation in *nix $ &#8230; <a href="http://skodak.org/blog/?p=67">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Starting in Moodle 2.4 the recommended way to install <a href="http://www.phpunit.de/" target="_blank">PHPUnit</a> for Moodle testing is via <a href="http://getcomposer.org" target="_blank">Composer dependency manager</a>.</p>
<h2>Benefits compared to old-style PEAR installations</h2>
<ul>
<li>much easier installation</li>
<li>local installation in Moodle dirroot</li>
<li>safe and easy upgrades</li>
</ul>
<h2>Installation in *nix</h2>
<p><code>$ cd /your/moodle/dirroot<br />
$ curl -s https://getcomposer.org/installer | php<br />
$ php composer.phar install<br />
</code></p>
<h2>Test execution in *nix</h2>
<p><code>$ cd /your/moodle/dirroot<br />
$ vendor/bin/phpunit<br />
</code></p>
<p>See <a href="http://docs.moodle.org/dev/PHPUnit">http://docs.moodle.org/dev/PHPUnit</a> for more information about testing of Moodle code with PHPUnit.</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=67</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replicating and fixing bugs</title>
		<link>http://skodak.org/blog/?p=55</link>
		<comments>http://skodak.org/blog/?p=55#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:32:58 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=55</guid>
		<description><![CDATA[System administrators or users may find problems that developers can not reproduce or can not diagnose. I would like to describe my approach. First step is to try to replicate the problem on the my own development machine which is &#8230; <a href="http://skodak.org/blog/?p=55">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>System administrators or users may find problems that developers can not reproduce or can not diagnose. I would like to describe my approach.</p>
<p>First step is to try to replicate the problem on the my own development machine which is usually very different from the original server. If I can replicate it then I can probably fix it and when it finally works for me it will probably work on the original server too.</p>
<p>If I can not reproduce it I usually try to get the same data (db dump, backups, etc.) and ask for the exact steps to reproduce it, preferably with screenshots. The full db dump is always the best way, unfortunately privacy regulations often prevent admins from sending it to me even in encrypted form.</p>
<p>The next step is to try to replicate the exact server environment &#8211; that is OS version, PHP, database, configurations, etc. If I can not replicate it on the same software then I might eventually give up and wait till somebody else manages to reproduce it or I have to keep reading the code until I find the bug.</p>
<p>If I manage to reproduce the problem on the same sw, but not on my own test server then the problem may be a PHP or database version specific bug or it may be outside of Moodle code. You would probably try to use different PHP and database version first, then search through respective release notes or bug trackers.</p>
<p>As you can see a lot of these diagnostics can be done easily by sysadmins that have access to the original data &#8211; of course they have to know a bit about PHP, SQL syntax and Moodle internals. The more time the reporter spends on a bug report the higher chance the bug gets fixed quickly.</p>
<p>In the next post I am planing to describe my typical security review, hopefully it will be a bit less boring,<br />
ciao!</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=55</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Consultation module</title>
		<link>http://skodak.org/blog/?p=44</link>
		<comments>http://skodak.org/blog/?p=44#comments</comments>
		<pubDate>Sun, 29 Nov 2009 22:09:45 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=44</guid>
		<description><![CDATA[Half a year ago Andrea asked to review the old Dialogue module. I have found and reported several problems in it, unfortunately I did not like some design decisions and in the end decided to create a new module instead &#8230; <a href="http://skodak.org/blog/?p=44">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Half a year ago Andrea asked to review the old Dialogue module. I have found and reported several problems in it, unfortunately I did not like some design decisions and in the end decided to create a new module instead of fixing problems directly in Dialogue.</p>
<p>Consultation module is similar to Dialog but it is more targeted at <em>teacher-student</em> communication. Capability overrides allow it to work in <em>student-student</em> mode too.</p>
<p>Features and differences:</p>
<ul>
<li>1-1 communication contained in one course (forum is designed for more users)</li>
<li>included in course backup (messaging is not backed up)</li>
<li>optional limit of inquiries per student</li>
<li>notification block</li>
<li>recommended coding style (suitable example for new developers)</li>
<li>optionally teachers may review and interrupt communication of other users</li>
</ul>
<p>The latest version may be downloaded from contrib CVS now or later as <a href="http://download.moodle.org/download.php/packages19/consultation_package.zip">zip package</a>. Please note it is compatible only with the latest 1.9.7 release or later.</p>
<p>Development of this module was funded by Italian Moodle partner <a href="http://mediatouch.moodle.com/moodle/index.php">MediaTouch 2000 Srl</a> and <a href="http://www.cdv.tul.cz/">Technical University of Liberec, Centre of Continuing Education</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=44</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Permissions continued</title>
		<link>http://skodak.org/blog/?p=29</link>
		<comments>http://skodak.org/blog/?p=29#comments</comments>
		<pubDate>Thu, 12 Mar 2009 23:29:33 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=29</guid>
		<description><![CDATA[Today I have finished a new sample implementation of permission UI. Here is the screenshot The (x) allows quick removing of permission or prohibits, the (+) leads to a form where you can select role to be given permission or &#8230; <a href="http://skodak.org/blog/?p=29">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today I have finished a new sample implementation of permission UI. Here is the screenshot <img src='http://skodak.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div id="attachment_31" class="wp-caption aligncenter" style="width: 310px"><a href="http://skodak.org/blog/wp-content/uploads/2009/03/new_permissions.png"><img src="http://skodak.org/blog/wp-content/uploads/2009/03/new_permissions-300x179.png" alt="New permissions UI" title="New permissions UI" width="300" height="179" class="size-medium wp-image-31" /></a><p class="wp-caption-text">New permissions UI</p></div>
<p>The (x) allows quick removing of permission or prohibits, the (+) leads to a form where you can select role to be given permission or marked as prohibited.</p>
<p>Is this easier to understand and use for ordinary teachers?</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=29</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Permission evaluation revisited</title>
		<link>http://skodak.org/blog/?p=22</link>
		<comments>http://skodak.org/blog/?p=22#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:27:34 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=22</guid>
		<description><![CDATA[Since 1.7 the evaluation of role overrides was a great source of confusion. I never understood it properly until I actually had to do some changes in the code. Some two weeks ago I started a sample implementation of new &#8230; <a href="http://skodak.org/blog/?p=22">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Since 1.7 the evaluation of role overrides was a great source of confusion. I never understood it properly until I actually had to do some changes in the code. Some two weeks ago I started a sample implementation of new enrolment framework. When I got to function get_users_by_capability() I realised there is no way to improve performance of it. Also after spending a few hours studying the accesslib.php code and reading docs at <a href="http://docs.moodle.org/en/How_permissions_are_calculated">How_permissions are calculated</a> came to conclusion that we over engineered this, in fact I never saw anything like this anywhere else which is definitely not good sign.</p>
<p>How to solve this? Easy &#8211; steal ideas from known file system access control implementations <img src='http://skodak.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  Each evaluation of access permissions is done for each group separately, you have access if you are member of at least one group that has access in given directory. It did not take long and I replaced the current complex permission evaluation code with new much simpler version that matches known filesystem concepts &#8211; yay!</p>
<p>You can find more information at <a href="http://docs.moodle.org/en/Development:Role_overrides_revisited">Role overrides revisited</a> and <a href="http://tracker.moodle.org/browse/MDL-18475">MDL-18475</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=22</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install/upgrade related work</title>
		<link>http://skodak.org/blog/?p=14</link>
		<comments>http://skodak.org/blog/?p=14#comments</comments>
		<pubDate>Tue, 13 Jan 2009 22:48:25 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=14</guid>
		<description><![CDATA[Last week was relative productive for me, finally I managed to start refactoring of installation and upgrade subsystem. I have cleaned up the code a bit, added some new features and removed parts that are not going to be used &#8230; <a href="http://skodak.org/blog/?p=14">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last week was relative productive for me, finally I managed to start refactoring of installation and upgrade subsystem. I have cleaned up the code a bit, added some new features and removed parts that are not going to be used any more.</p>
<p>The installation and upgrade is now executed on one page only, this was needed for cli installer and unit test framework. This means we do not need upgrade autopilot and it is also a bit faster now. Another very visible change is that by default sql queries are not displayed any more, this was a bit of an experiment at first it turned out that there were several hidden error messages among the tons of sql. If you still want this feature you can add <code>$CFG->upgradeshowsql = true;</code> to your config.php. Some time ago I have reworked the upgrade locking, the sites are now inaccessible during upgrade &#8211; this should be much more reliable than the session based locking before.</p>
<p>Today I have added logging of changes done in server configuration, not everything is logged yet &#8211; only settings converted to new admin tree stored in config and config_plugins table are tracked. SImple UI is located at Report / Config changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello world Planet Moodle</title>
		<link>http://skodak.org/blog/?p=8</link>
		<comments>http://skodak.org/blog/?p=8#comments</comments>
		<pubDate>Fri, 09 Jan 2009 11:57:01 +0000</pubDate>
		<dc:creator>skodak</dc:creator>
				<category><![CDATA[Moodle]]></category>

		<guid isPermaLink="false">http://skodak.org/blog/?p=8</guid>
		<description><![CDATA[Let me introduce myself first. I am one of the Moodle developers, my main responsibility is security and in general anything nobody else wants. I started coding in PHP about 4 years ago, I am working for Moodle HQ for &#8230; <a href="http://skodak.org/blog/?p=8">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Let me introduce myself first. I am one of the Moodle developers, my main responsibility is security and in general anything nobody else wants. I started coding in PHP about 4 years ago, I am working for Moodle HQ for 3 years now.</p>
]]></content:encoded>
			<wfw:commentRss>http://skodak.org/blog/?feed=rss2&#038;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
