Moodle Competencies, Moodle grading scales, When it all goes wrong…

I am working with a client using Moodle and they wanted to implement competency based assessments. That’s all fine, I thought, and went about setting up the competency frameworks in Moodle, and then adding the scales to asses (from ‘beginner’ to ‘Expert’ or thereabouts).

Moodle has a slightly odd approach to scales in Competencies – you create the scale in one part of the interface, and then apply it and configure it in another.  You basically add all of the possible items for your scale as a comma separated list, and then select it as the scale to use for your competencies… and configure which of the items is the ‘default’ to assign unless changed by an admin, and which of the items signifies ‘proficient’. Think of a two part scale – not proficient, and proficient… one would be the default and the other would be used to signify the person has attained proficiency…

Now apply the same theory to a four part scale, where every item shows proficiency, but at varying degrees. For example, a scale like this: “Learner”, “Intermediate”, “Proficient” and “Expert”. All of them show a level of proficiency, but not the same level, which is fine.  The lowest item would be the default for the scale, so anyone assessing a piece of work would see “Learner” selected, and go from there if they thought it warranted a higher level.

And here’s where it gets wierd. When you assign a scale to a competency framework in Moodle, you need to configure that scale to show those options in the way you want. There is no ‘Save’ button when you check the boxes you want, so you just ‘close’ the window, and then ‘Save’ at the bottom of the page instead. If all is well, Moodle takes you to the competency framework page to add/edit/ content. However, in every single case I’ve ever tried, it just gives me an error:

“The scale needs to be configured by selecting default and proficient items.”

No matter what I do, with two items, four items, one item on the scale… nothing actually works. Not sure if it is a bug, a permissions issue or something I’m doing wrong, but it just refuses to accept the input I make on the form.

If you’re getting the same, here’s how to fix this. Go into your database (if you can… many Moodle admins won’t have access to this, but you’re going to need it), and find the table called ‘mdl_competency_framework’. In there, you’ll see the “scaleid” field which gives you the ID number for the scale that the framework you’re creating is actually using. You can check this ID number pretty easily by looking in the ‘mdl_scale’ table. Next to that you’ll see the field showing the options that are being applied, and you can edit those options. They look a bit like this:

[{"scaleid":"2"},{"id":1,"scaledefault":1,"proficient":0},{"id":2,"scaledefault":0,"proficient":1}]

It looks off-putting if you’ve never seen it before, but it’s actually really easy to understand.

  • “scaleid” is in fact the ID number of the scale to use – you can change it, just by changing the number. However, if you do that, and the scale you set has a different number of options, then you need to add more to this string of text.
  • “id” in the second set of parenthesis is the row on your scale. Row 1, at the top when you went to configure it as a value of ‘1’.
  • “scaledefault” sets whether this item is the default for the scale or not – ‘1’ means yes, ‘0’ means no.
  • “proficient” is whether the item is to be considered as proficient or not – again, ‘1’ means yes, ‘0’ means no.

The second set of parenthesis is exactly the same but for the second option on your scale. So… what if you have more than two items on your scale? Copy the same format and extend it with more sets of parenthesis… For example, add a third set of parenthesis for your third option on your scale, remember to use a comma between each set of parenthesis:

[{"scaleid":"2"},{"id":1,"scaledefault":1,"proficient":0},{"id":2,"scaledefault":0,"proficient":1},{"id":3,"scaledefault":0,"proficient":1}]

Note that the “id’ for the third item has changed to ‘3’ and it is not the default (because of the zero) but is something that could indicate proficiency.

As it happens, my simple scale had four options, so I needed to make four sets of parenthesis. Making sure I knew the ID for my scale, it became this (remember to put the comma…):

[{"scaleid":"3"},{"id":1,"scaledefault":1,"proficient":1},{"id":2,"scaledefault":0,"proficient":1},{"id":3,"scaledefault":0,"proficient":1},{"id":4,"scaledefault":0,"proficient":1}]

Basically saying, the first option (“Learner”) is the default, and yet every other option, if selected would indicate a level of proficiency.

After saving this back into the database, I refreshed the moodle page and went to configure the scale… lo and behold, it worked:

 

 

 

 

 

 

 

 

So, the scale is created within the Moodle Site Administration -> Grades section, and is really just a comma separated list. Then you can choose the scale you want when setting up your competency framework, and it is in the competency settings that you configure how the scale will work.

Now, I’ve no idea why the moodle page won’t allow it, but the only workaround I could find was to edit directly in the database. You may be lucky and find it works ok for you, but if not, it’s time to load up PHPMyAdmin (Or whatever your preferred tool is) and dig into the Moodle tables!