Picture of Mike  Nedelko
GMCQ: More than 2 items in row?
by Mike Nedelko - Wednesday, 21 January 2015, 9:17 AM
 

Hi Adapt Learning Community

I designed a course where users are required to select 6 out of 10 items in a Graphical Multiplichoice Question (GMCQ), however the standard Adapt theme only displays a maximum of 2 items per row, which is not ideal for more than 4 items.

As such, I am attempting to increase the number of GMCQ items per row from 2 to 4. Attempted to get my hands dirty with handlebars, but soon discovered that I got lost. Any idea which file and/or properties I would be required to edit? 

 

Any advice would be highly appreciated.

 

Mike 

Picture of Mike  Nedelko
Re: GMCQ: More than 2 items in row?
by Mike Nedelko - Wednesday, 21 January 2015, 1:24 PM
 

Ok, so I found a solution. Although its just a workaround.

I simply removed the 'clear: both' argument in the gmcq.less file. 

I know this is probably just a workaround and I am currently exploring ways of modifying the following function in the helpers.js file:

odd: function (index) {

return (index +1) % 2 === 0 ? 'even' : 'odd';

},

I am intending to chain the ?: (ternary) operator so that the function will return two additional values. 

I am not quite sure, but I think this would require a change to the 'function program5' function in the templates.js file [line 190]. 

Currently checking whether a change to the helper.js file would have any significant impact on other elements of the theme. 

Will keep the community updated on this 'learning experience' of mine :).

Any advice on the way is of course very welcome :).

Mike

 

 

 

 

Picture of Tom Taylor
Re: GMCQ: More than 2 items in row?
by Tom Taylor - Thursday, 29 January 2015, 11:25 AM
 

Hi Mike,

I think one of the uses for this function is to colour alternate buttons for menus and the like (so you get red, black, red black for example).