Skip to main content
All CollectionsAuthorsExercise types
Exercise type: Rank Order
Exercise type: Rank Order

Everything you need to know about the exercise type: Rank Order

Updated over a year ago

Jump to:

The exercise type 'Rank Order' entails that a student has to place one or more item lists in the correct order. Examples are the following:

Example 1

Example 2

As can be seen in the examples, there are grey columns (that are fixed) and white columns (where the cells can be moved around per column). As can be seen in Example 1, we can also have a fixed grey title row.

When starting the exercise, the order of the cells in the white columns is random. Note that Example 1 and 2 above already display the correct answer.

Creating the columns and defining the solution

The required columns and the solution should be defined in the input area. We need two functions for this: #list( item_1 ; item_2 ; … ; item_n )# for the grey column, following by one or more #rank( item_1 ; item_2 ; … ; item_n )# for the white columns. The items should be listed in the correct order since the student’s answer will be checked against the order of the items in these functions.

All functions should have the same number of items and items can be empty. Moreover, the functions should be placed in the same line in the input area without line breaks in between.

The input area of Example 1 (without title row) looks as follows. Note that the items are listed in the correct order, meaning from smallest to largest.

This looks as follows to the student.

Note that the order of the white cells is random. The student now has to change the order of the white cells to the correct order to obtain full points for this exercise.

The input area of Example 2 looks as follows:

And results in the following exercise:

Important note

If we want to use LaTeX in an item, we can prevent errors by making sure that the delimiters # are preceded and followed by a space. In other words, we need #rank( # latex_1 # ; # latex_2 # ; # latex_3 # )# instead of #rank(#latex_1#;#latex_2#; #latex_3#)#.

It is not possible to use semicolons (;) in the items.

Adding a title row

To add a title row, we need to precede the first item in all functions with title:column_title ; where “column_title” is replaced by the name you want to give the column. Column titles can be empty.

The input area of Example 1 with a title row looks as follows:

and results in the following exercise:

Specifying the width of columns

The width of a column is automatically adapted to the width of the largest cell in that column. However, we can change the width of one or more columns by hand if we wish. To do this, precede the first item in the list by width:width_specification ; where width_specification is either a percentage of the horizontally available space (%) or a number of pixels (px).

Example 1A: the width of the first column is set to 50%

Example 1B: the width of the second column is set to 100px

Note: If you specify a percentage on all columns, the percentages should add up to about 95% instead of 100% to account for the borders of the table. The number of pixels can add up to about 890px depending on the number of columns.

Note: When you use both a title row (using title: ) and a width specification (using width: ), it does not matter which one you put first in the list. You can either use #rank( title:title_name ; width:100px ; item_1 ; … )# or #rank( width:100px ; title:title_name ; item_1 ; … )#.

Feedback

It is not possible to provide tailored feedback to this type of exercise. The only feedback that is given to the student is that correctly placed items will be marked green and wrongly placed items will be marked red. Thus, if the correct order is 1,2,3,4, then 2,3,4,1 will be marked completely red, even though 2,3,4 are placed in the right order with respect to each other. The order 1,2,4,3 would get the first two cells marked green and the last two cells marked red.

Below we see some possible outcomes from Example 1:

Did this answer your question?