A CHECK button for each part (for multipart question & adaptive behaviour)

A CHECK button for each part (for multipart question & adaptive behaviour)

by Bernat Martinez -
Number of replies: 13
We are using Moodle 3.1, and just one year ago  we were at M1.9,  what a change!!, congratulations to all involved in it. 


Anyway  we are missing from Moodle1 the way adaptive mode worked showing a SUBMIT button for each subpart of formulas question ( and maybe in STACK too). 

This feature was very useful as it allowed us to create questions leading students step by step, in a tutorial way . I know we can also do it in M3 but as the check button is at the end, it is not intuitive for students. So we have to remind them to check before continuing ( see below, sorry it is google-translated)

My questions is if it would be feasible to have this  again in Moodle3?


Thanks in advance

Attachment Screen Shot 2016-06-03 at 12.36.47.png
Average of ratings: Useful (1)
In reply to Bernat Martinez

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Bernat and Jean-Michel Védrine,

Our engineering school is now at M2.9.1 and I believe that it is moving to M3 in September.

Having a "Check" button for each question part in the Formulas question type was appropriate for earlier versions of Moodle. However if I understand correctly from the posts Formulas question type and Formulas question type for Moodle 2.0, the work required for keeping this in Moodle 2 was overwhelming. Jean Michel Védrine, who did a tremendous job in updating the Formulas question type, came up with the elegant solution of having just one button acting in exactly the same way as all the buttons of the question parts. This is a neat alternative!

However, I agree with you that it is not intuitive for the students to have the "Check" button at the end of the page. I would say that it is confusing for many students and, as the number of question parts increases, the scrolling up and down required to just click the "Check" button is time consuming and quite distracting.

One workaround solution would be to have the "Check" button in a fixed position at the top of the page. This way the button would always be visible and easily accessible. See the screen shots below. But, judging from a similar question ([MDL-26948]), this will probably not be implemented in the official version and it will be left to the site administrator to modify the relevant .css files.

So, here is my question. Jean-Michel (Védrine), Do you think that it is possible to have both the "Check" button and the small question block (so that the students can see their mark without having to scroll up and down as they progress through the question parts) placed in a fixed position, as shown in the figure below? If yes, could you give some hints as to which .css files or parts of the code need to be modified? Regards,


In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Bernat Martinez -

Hi Dominique, 

I completely agree with all your words, the work done by Tim at quiz engine is superb as  the work done by Jean Michel adapting the formulas question to Moodle2. 

As regards your proposal I'm not  completely  sure if this would be fine for  the way we are trying to organize the tutorial type question. Anyway all improvements are welcomed.

On the other hand, we are starting to include interactive graphs inside formulas questions using JSXGraph filter. Are you using such a filter too? 


Regards

Average of ratings: Useful (1)
In reply to Bernat Martinez

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Bernat,

I am not using JSXGraph because I do not have much use for it in a course on the design of steel structures. For now, I am not using filters. I am only adjusting the html code and adding some simple javascript here and there.

I am using Formulas questions in much the same way as you are, that is, in a tutorial way, leading students step by step for solving problems. I am also using them for examinations.

As the number of steps increases, the page gets quite long (I have typically 20 or more steps, i.e. parts, in any given problem). As you know, in Adaptive mode, students can check their answers as they progress through the test, by clicking the Check button. But each time they want to check, they have to scroll down all the way to the bottom of the page, click the Check button and then scroll back up all the way to where they were. Not only this is not intuitive for students, it is cumbersome and time consuming for them.

Having the Check button alongside the test instead of at the bottom, in a fixed position say at the upper left or right part of the screen would not change much for you or anyone with short tests, where the Check button is always visible anyways. On the other hand, it would be quite an improvement for long tests where much scrolling down and up is required, unnecessarily, for just one click.

I may be mistaken, but I think that fixing the position of a button, i.e. to prevent it from scrolling, can be done quite easily.

I know that developers are quite busy so I am trying to find workarounds. Unfortunately, I have not found one for this problem.

In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Dominique,

Since getting the check button moved, or altered in a way that would let you pick where it would appear, is not likely to happen anytime soon, here is a possible work around that might help.

I think this is one of those cases where a "filter" can solve your "long scroll" problem, specifically, the Generico filter using using the "toggle" preset that comes with the filter. As you can see in the photo, this example formula question has five parts and does not take up much space, unless the student wants it too, due to the Generico toggle preset being applied once in each part of the question.


What's hidden:

  • Part one contains text and two pictures.
  • Part two contains text and one picture.
  • Part three contains text and an mp4 video.
  • Part four contains text and a JSXGraph that is inserted using another Generico filter inside the toggle filter.
  • Part five contains text and a mortgage calculator that is inserted using another Generico filter inside the toggle filter.

When all five parts are expanded, the page is quite long, but each occurrence of For Part x, click here, one click expands it, and another click, collapses it, thus always keeping the Check button "nearby."

Note, that for ease of use, there are two plugins involved here, the Generico filter, and the plugin for the Generico toolbutton for the Atto toolbar.

Average of ratings: Useful (2)
In reply to AL Rachels

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi AL,

Thank you. For collapsing some information, I use the <details> tag directly in the html code of the page. It is simple and works fine (see for example http://www.w3schools.com/tags/tag_details.asp).

Even with collapsed questions, the page gets long quickly because of the feedbacks and marks, displayed for each part, that cannot be collapsed.

The End key is a shortcut in Chrome for going to the bottom of the page. After clicking Check, the Home key is another shortcut for going to the top of the page. This is a little better than scrolling with the mouse.

I understand that it is not likely to happen, but the Check button could simply be duplicated to the top of the page, in the same way as the Save button, in the Single View of the Gradebook, is available both at the top and bottom of the page. Or better, the Question block and the Check button could be put together in a ‘dock’ set to stay visible (open).

In reply to AL Rachels

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

AL,

Oups. Of course, feedbacks can also be collapsed blush.

Well, if I make everything collapsible, i.e. the main question and all parts' questions and feedbacks, the page will definitely have a more manageable length and may also become clearer.

Thank you for your excellent suggestion.

In reply to Bernat Martinez

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Introduction

The following brief discussion concerns questions that, as Bernat eloquently put it, lead students step by step, in a tutorial way. I would add, with the possibility of evaluating the students at each step. This is a good way of using the Formulas question for solving science and engineering problems, both during tutorials and examinations, one that is as close as possible to real life problem solving. Other uses of the Formulas question may have different requirements.

Because of the convenient features of the Formulas question and in order to maintain uniformity in the required input format for the answers, most if not all of my Moodle quizzes are now using the Formulas question.   

Inconvenience and workarounds

For the type of problems considered, it is a good choice to use a single Formulas question with several parts (i.e. subquestions) in the Adaptive mode:

  • The Formulas question has many useful features, such as easy generation and treatment of random variables, means for making elaborate calculations, etc.
  • Having a single question with several parts allows sharing variables to parts, as required for the continuity throughout the solution, as well as having a solution broken down into several steps, required in problem solving.
  • Contrary to the Interactive-with-many-tries mode, the Adaptive mode allows the students to check several answers at a time or just one by one.

The following should be considered:

  • The solution of science and engineering problems at the University level may be quite long and therefore the Formulas question may have many parts.
  • The students must have a global view of their solution and be able to keep an eye on it, i.e. they should be able to easily view at least the previous questions and answers, and probably the following ones (I found that having a Sequential navigation mode was more inconvenient than necessary).
  • While solving a problem, having to scroll up and down is quite distracting.

With the current version of the Formulas question, and with many questions and therefore long web pages, the students have to scroll all the way down to the bottom of the page simply in order to click the Check button, which then takes the page all the way to the top, and finally the students have to scroll back down to where they were in the first place. Having to scroll many times just to reach the Check button or view the Question block to see the current mark is inconvenient.

The students should be able to enter any answer on the question page, click the Check button, check their mark in the Question block and continue with the quiz, all without having to scroll. This is a basic.

Hon Wai’s original version

Pros

  • Each part had a Check button. Therefore there was no need to scroll down to the bottom of the page.

Cons

  • Compatible only with earlier versions of Moodle.
  • Was difficult to update to new versions of Moodle, due to the complexity as well as the limited amount of resources.

Comment

  • Having not used this version myself, I can only presume, judging from the excellent work of Hon Wai and the comments from Bernat, that the original Formulas question was user-friendly.
  • Since each part is in fact a distinct subquestion, having a button for each part is similar to having several questions of any type (True/False, Multiple choice, etc.) all laid out on one page. If there are twenty such questions, there will be twenty Check buttons and nobody will find anything wrong about this. 

Jean Michel’s current version

 Pros

  • The replacement of all buttons by a single one was a good idea because it makes the layout clearer.
  • Compatible with the current versions of Moodle.

Cons

  • Requires too much scrolling, as explained above.

Generico Filter workaround

Pros

  • As mentioned by AL , the “toogle” preset that comes with the filter can be used to collapse questions, making the pages shorter and thus giving an easier ascess to the Check button.

Cons

  • Collapsing the questions is a nice feature but the students will probably want to expand the questions most of the time in order to refer to them. Also, having to click to expand a question, click to collapse it, click to refer to it, click again to collapse it, etc. is not much better than having to scroll up and down.

Comment

  • I had a look at the documentation for the Generico Filter, but I have not tried it. There may be another problem, which the Details tags has (see below), that each time the Check button is clicked then all the parts get closed. AL, how does the Generico Filter behave regarding this last point?

HTML5 Details element workaround

Pros

  • The Details element is a standard HTML5 tag and is simple to use.

Cons

  • Same as with the Generico Filter. In many instances, the students will want to expand many questions, making the page long and the Check button again far down. Having to click to expand and click to collapse many times is not convenient.
  • Each time the Check button is closed, then all the Details get closed, which defeats the purpose of expanding some questions.
    • This behavior can be changed by writing a small Javascript with a localStorage variable that keeps track of which Details are expanded and which ones are collapsed. I gave it a shot, but could not make it work. This might have been beyond my abilities or available time, but I got confused with the ‘open’ boolean which has to values, non-existent and “open” or null. I know how to get the ‘open’ value, store it in localStorage, which stores everything in strings, but how on earth can the value be passed back? Could someone help me here.

Bootstrap’s Tabs (or Pills) workaround

Pros

  • Easy to use.
  • Makes the pages short by breaking the contents into several tabs.

Cons

  • Only one tab or pill content can be displayed at a time. For the same reason as with the other workarounds, is not convenient, for the type of problems considered, to have only one part of the solution visible at a time.
  •  Each time the Check button is closed, then the focus goes to the default active tab, which defeats the purpose of opening a given tab.
    • This behavior can be changed also by writing a small Javascript with a localStorage variable that keeps track of the active tab. Again, writing such a script may be  beyond the abilities of ordinary Moodle users like me.

Moving the Check button to a fixed position

Pros

  • Would be easy to implement. All that is required seems to be a “style” attribute in one line of the code:

<div class="im-controls">
  <input style="position:fixed;top:270px;left:35px;" type="submit" id="q208621:1_-submit" name="q208621:1_-submit" value="Vérifier" class="submit btn">
</div>

This style attribute would have to be restricted to the question page and not be used elsewhere, for example in the Review page. 

Cons

  • Not implemented. 
  • Even if the Check button had a fixed position, when it is clicked the page scrolls all the way to the top. The students have to scroll back to where they were, which is inconvenient.

Comment

  • I could easily add myself a fixed button directly in the question page, with the same input as above, except for the id and name numbers hence it would not work.

Summary

Having one Check button per part or one button for all parts are both acceptable layouts. Having only one Check button requires that it should be made more easily accessible.

Having collapsible parts, using either the Generico Filter or the HTML5 Details tag, or having tabs using Bootstrap’s Tabs or Pills, are nice features that can be used elsewhere in Moodle. They do not make for a satisfactory workaround for the case at hand.

Recommendations

  1. Move the Check button to below the Question block and make them both fixed in position.
  2. Prevent the page from scrolling when the Check button is clicked (or have it return to its position).
  3. and …, …, gee, is that all there is to it?

Conclusion

Considering that Moodle quizzes (and on other platforms such as Coursera, etc.) are composed of 90% true/false et multiple choice questions and that Moodle has this exceptionally well written Formulas question that permits the making of elaborate quizzes, Moodle should encourage the use of the Formulas question by making the question page, most important for the students, more user-friendly.

In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You keep saying that Moodle scrolls to the top of the page when Check is pressed. However, that is not true. When you press Check, it keeps the page scrolled to exactly the same place you were at. (I just verified that at https://qa.moodle.net/mod/quiz/view.php?id=55, scroll down a bit, then check one of the questions.)

You can probably get the styling you want by adding some extra CSS to your site using Admin -> Appearance -> Additional HTML. In the HEAD section, add something like

<style type="text/css">
#mod-quiz-attempt .que.formulas .im-controls {
    position: fixed;
    top: 270px;
    left: 35px;
}
</style>

Note, I have not tested that. It is probably wrong in some detail, but right in spirit.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Tim,

Tim Hunt wrote:

When you press Check, it keeps the page scrolled to exactly the same place you were at. (I just verified that at https://qa.moodle.net/mod/quiz/view.php?id=55, scroll down a bit, then check one of the questions.)

That is true. It is a nice feature of Moodle, that works when there are several questions, of any type, laid out on the same page.


Tim Hunt wrote:

You keep saying that Moodle scrolls to the top of the page when Check is pressed.

That is true. It happens with long Formulas questions.

AL Rachels has shown above a "Formula - long multipart example", with a setup identical to the one I am talking about and that I use in my course, except that my questions have more parts than the five shown, so they do not fit inside the height of the screen.

Formulas questions can be quite long when they have many parts. If students want to check their answers while they are in the middle of a long question, they have to scroll down to press the Check button, which scrolls the page to the top, and scroll again to the place they were at.


Tim Hunt wrote:

You can probably get the styling you want by adding some extra CSS to your site using Admin -> Appearance -> Additional HTML. In the HEAD section, add something like...

Thank you. I do not have administrator rights, but I will pass the information to our team.


What exactly do I want?

Tim Hunt wrote:

I just verified that at https://qa.moodle.net/mod/quiz/view.php?id=55,...

The example in the Moodle QA Testing Site to which you are pointing is pretty much what I would like to see, if the questions were of the Formulas type. That is:

  • no need to scroll in order to press Check, because questions are short;
  • the page is scrolled to the same place it was when Check is pressed;
  • the Question blocks are visible.

Nice, but in order to have short Formulas questions, long problems would have to be divided into a few short questions, except that variables (Random and Global) cannot be shared between Formulas questions...

But then what?

  1. Option 1: Short-term solution

    1. Modify the Formulas question so that the Check button and the Question block are in a fixed position, always visible.
    2. Modify the Formulas question so that the page is scrolled to the same place it was when Check is pressed.

Probably this option would not require much effort and could be readily implemented. The question page would still be long, but at least the Check button and the Question block would stay visible, and scrolling would not anymore be required.

  1. Option 2: Not-so-short-term solution

    1. Make Random and Global variables shareable between different Formulas questions. This would be somewhat similar to sharing variables to parts in the current Formulas question. The teacher could specify which questions have to be connected, by referring to the ID numbers. The advantages of this option are:

  • If there are many parts to a problem, some questions could be made each one with only a few parts that go together. These questions would be of course much shorter than a single question with all the parts and could be made as short as wanted.
  • If these short Formulas questions are laid out on the same page, Moodle's automatic scroll back feature would become useful.
  • With short questions, the Check button and the Question block would stay visible.
  • Connected Formulas questions could be laid out all on the same page or each one on a new page.
  • It would be possible to insert other types of question between the Formulas questions. 
  • Students could more easily keep track of their marks.
  • Teachers could more easily check the students' marks.

What's next?

The Formulas question is a gemstone. Let's see if Moodle wants to polish it yet a bit more.

In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't understand how both the first two statements in yoru email can be true.

The code that scrolls after check is pressed does noot care which questions are on the page, nor what question types they are. That functionality should always work. You need to work out why it is not working on your site. For example, is your web browser reporting any JavaScript errors in the developer console?

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Tim,

It may be that I have not been clear enough. The problem is not that the functionality does not work. It works very well and always takes the screen back to the beginning of the question, regardless of its type, at which we were before clicking the Check button. This is fine and does not cause any problem for fairly short questions.

On the other hand, Formulas questions provide for sub-questions, called parts. As the number of sub-questions increases, questions can get quite long. Quizzes will often consist of only one such question. In that case, the top of the screen and the top of the question coincide. Also, there may be quite a distance between the top of such a question and one of its sub-questions. Therefore, it would be desirable that the functionality takes the screen back to the right sub-question, not just the top of the question.

In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

"It works very well and always takes the screen back to the beginning of the question"

That is not how it is supposed to work. It records the exact position the page is currently scrolled to (in pixels from the top of the page), then after the page has reloaded, it scrolls to exactly the same place.

If it is not doing that, then the JavaScript is not working properly on your system, which might be due to various things (particular web browser, something in a custom theme, ...). If we knew what was wrong, it might be fixable. (And, as I said, when I tested on qa.moodle.net, it worked exactly as I expected it to.)

In reply to Dominique Bauer

Re: A CHECK button for each part (for multipart question & adaptive behaviour)

by Bernat Martinez -

It is impressive, Dominique, the work you have done to summarize all the possible approaches to improve formulas question.

We completely agree that formulas question permits making elaborate quizzes.  In fact, nowadays  there are a lot of possibilities to create didactical questions. So, in order to  show a broader view  of our use of quiz  system, we are sharing a google table (feel free to edit).  

https://docs.google.com/document/d/1wLADZ8bNAY4AguQ4VKg5YzhhYhPSOOZjq-vCE18HTI0/edit?usp=sharing

This represent  our ongoing approach to using quizzes for teaching STEM subjects for students 10-16 years-old. Obviously your university students will demand another approach, but I think this discussion could be useful for all Moodle community.

Average of ratings: Useful (1)