HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... go back and forth in a module
go back and forth in a module
  View type:
Objective:
A student must answer a question to enable the ‘next’ button, he may go back and then forward again but never pass the page he did not already answered the question.

An example of the use of 'score'.

1.
Open ‘module – runtime settings – objectives’.
Add an objective ‘pageCounter’.

On the master page add an object ‘Navigation - Current Position’.
Identifier is ‘pageDisplay’.

2.
On every page but the last make actions ‘afterdisplay’:
IF SCORE(Objective=’pageCounter’, Source=,Condition=’>=’, Score=’$pageDisplay.currentPosition’)
NAVIGATION(Navigation Objects=’Button Next’,Action=’Enable’)
ELSE
NAVIGATION(Navigation Objects=’Button Next’,Action=’Disable’)

3.
Then on the question make actions ‘On Attempt’
NAVIGATION(Navigation Objects=’Button Next’,Action=’Enable’)
SET SCORE(Objective=’pageCounter’, Source=,Additive=’Replace’, Score=’$pageDisplay.currentPosition’)

4.
On the last page make an action ‘afterdisplay’:
SET SCORE(Objective=’pageCounter’, Source=,Additive=’Replace’, Score=’$pageDisplay.currentPosition’)

NB.
Now when you publish, you get these annoying popups. They can be removed!

5.
Before publishing, in Courselab open properties of the questions:
Select: Allow Recurring approaches
Remove all Messages.

6.
Remove popups when reopening a question
Open runtime.xml and comment out wherever it occurs:
if(sMode=="browse") alert(oParams.selectSingleNode("q_browse_alert").text);
if(sMode=="continue") alert(oParams.selectSingleNode("q_continue_alert").text);

AND
Change
if(confirm(oParams.selectSingleNode("q_secondrun_confirm").text)) {
to
if(true) {

7.
Remove countattempts in runtime.xml:
Look for
<method type="q_002_select" name="CountAttempts">
And in that method change
document.getElementById(argobj.pid+"_q_attempts_count").innerHTML = ""; // was sAtt;
document.getElementById(argobj.pid+"_q_attempts_count").innerHTML = ""; // was "0";

Look for
<method type="q_002_select" name="Constructor">
And in that method change
document.getElementById(argobj.pid+"_q_attempts_count").innerHTM
 
At your own risk [:)]
Subject:
Message options
No additional options