Thursday, September 19, 2019

Permissions snafu when importing across courses in Moodle

The import feature in Moodle allows you to copy over resources and activites from one course into another.

When you start the import process, you choose the source course (ie, the course with the stuff you want to import) and you get to choose what to import: activities/resources, question bank, filters, blocks, etc.

Consider this scenario:

1. You have a forum in an old course for which you have removed posting permissions (maybe because you have students in that course who stay enrolled but you don't want them to use the forums any more).

2. You want to import a Book resource from the old course into a new course. You do not want to import the forums.

When you carry out this import, you would of course have the Book resource in your new course, but you may find that the students in your new course can't post on the forums any more! This is because the import process brings in the forum permissions from the old course into the new one, even though you have not imported the forums themselves. In other words, all the user permissions from the old course are copied over into the new course, regardless of which activities or resources you imported.

I would definitely put this down as one of the idiosyncrasies of Moodle. I looked it up on the Moodle Tracker and indeed there is a bug report.

So the next time you import anything from one course into another, check the user permissions in the destination course to check and fix anything that has inadvertently changed.

Friday, September 06, 2019

Keyboard shortcut for "replace in selection" in Brackets

I recently moved from Notepad++ to Brackets for coding some of the dynamic elements in Moodle course content. With its modern UI, live preview feature, and very useful Emmet extension, Brackets has given a boost to my workflow. Strangely, a simple feature is missing in Brackets: you can't replace characters within a selection of text. There is however an extension for this called, quite simply, "Replace in selection". Finding and installing it is straightforward using the Brackets extension manager, and the brief help text says that the keyboard shortcut is Control + R.

But that shortcut didn't work for me. What use is a find/replace function without a keyboard shortcut?

Looking at the user key bindings in Brackets (Debug -> open user key map), I realised I had to figure out the command ID for this feature. The main.js file of this extension indicated that it might be "replaceInSelection.Replace". And that it was indeed - I added the following to the key map file and the keyboard shortcut worked!

"overrides": {
         "Ctrl-R":  "replaceInSelection.Replace"
    }

Wednesday, September 04, 2019

Questionnaire plugin in Moodle vs SurveyMonkey

A few years back I compared the "Feedback" tool in Moodle with SurveyMonkey.

"Feedback" is one of the standard Moodle activity types, but it doesn't seem to be getting a lot of love from developers. I haven't seen any major improvement in its features from Moodle 2.1 to 3.5 over the past eight years.

One major drawback of the Feedback tool is that it is still not possible to include matrix-type questions (with rows for statements and columns for marking choices).

Here's where the "Questionnaire" plugin offers a compelling alternative, because you can create questions such as this:

Source: Moodle Docs for Questionnaire plugin



SurveyMonkey will probably always have a better user interface, a greater variety of question types, and more options to analyse responses than any feedback/questionnaire tool in Moodle.

But the Moodle Questionnaire plugin may be a better option if the following statements resonate with you.
  • Your course participants don’t have to go to a different site to take the survey – there’s no break from the course experience.
  • You can make survey completion part of the formula/criteria for participants to complete the course.
  • Even if you set the survey in anonymous mode, you can check which participants have completed the survey (though you can’t match the responses with the participants) and you can send a follow-up message with the non-responders.
  • You can easily refer to surveys used in previous courses to check which questions were included, view/download the responses again, etc.