Pages

Monday, December 12, 2011

Extending the Form Maker

In an earlier post, I introduced the remarkable Form Maker block. The block allowed you to create a data entry form where users could type in data input. The block allows you to output the data in PDF or XLS (Excel) format. Cool! The only problem I faced with it was that it allowed only a maximum of 11 fields. 10 fields plus the default email field. So what happened if you wanted to capture more data with the block? Well, you couldn't because there was no direct way to extend the number of fields beyond the default limit!

Until now. I poked around the code a bit and discovered that you could increase the number of edit fields in the front end by increasing the 10 part of the code to 20, whenever you see the < 10 code in these three files: config_instance.html, block_form_maker.php and block_form_maker_submit.php.


\config_instance.html (2 hits)
Line 61:  for ($i=0; $i < 10; $i++) {
Line 207:  for ($i=0; $i < 10; $i++) {
\block_form_maker.php (1 hit)
Line 44:  for ($i=0; $i < 10; $i++) {
\block_form_maker_submit.php (2 hits)
Line 20:  for ($i=0; $i < 10; $i++) {
Line 46:  for ($i=0; $i < 10; $i++) {

Change those lines to:

\config_instance.html (2 hits)
Line 61: for ($i=0; $i < 20; $i++) {
Line 207: for ($i=0; $i < 20; $i++) {
\block_form_maker.php (1 hit)
Line 44: for ($i=0; $i < 20; $i++) {
\block_form_maker_submit.php (2 hits)
Line 20: for ($i=0; $i < 20; $i++) {
Line 46: for ($i=0; $i < 20; $i++) {


After editing the files, save them back to their original filenames and FTP them back to the block's folder in your production or test site.

However, that's not the end of it. You also need to edit the block_form_maker table and add more fields into it. Whazzat? Don't worry, all you need is to download and install the popular phpMyAdmin tool. Then go to Administration | Server | Database to list the tables of your Moodle database. Like so:





Sunday, December 11, 2011

Upgrading your Moodle 2.1.x site to Moodle 2.2

Moodle 2.2!





If you're running Moodle 2.1.x and wish to upgrade to the latest new-fangled Moodle 2.2, then here's an EXCELLENT resource, generously littered with clear screenshots.

Sunday, December 4, 2011

Nadav's HTMLAREA Toolbar Extentions

I just spent the larger part of my weekend extending my Moodle 1.9.14's HTMLArea Toolbar. Many thanks to the prolific and brilliant Nadav Kavalerchik. See the moodle.org plugin page.


Hadav's work is amazing!. He has increased the pedagogical value of Moodle right from the Editor itself.

For me the most useful plugins that has has added to the Moodle editor functionality are:
1. Drag and Drop image adder (a must-have for any Moodle site! Previously only the admin or teacher could add images to the editor. Students could only insert images by giving the URL)
2. Insert PDF (no more having to figure out the HTML embed codes)

3. VideoRecorder (FANTASTIC. Thanks for Kevin Brake (and Vimas Technology)!)

Friday, December 2, 2011

How to install the Accordion Resource on Moodle 1.9.14


Abrar Ullah's Accordion Resource Editor 2009 module allows you to hide and display labels and Moodle resources and activities at will. I absolutely love using it on my Moodle site. In this post, I will show you how to install it on the latest (as of December 2011!) Moodle 1.9.14.

Firstlly, here's what it looks like on my production site:



Here's what the course page looks like after I click on the Video Accordion tab:

Ratings and Recommendations by outbrain