|
@ -25,16 +25,6 @@ export const sensorLogState = createStore( |
|
|
|
|
|
|
|
|
export const { getState, setState, subscribe, getInitialState } = sensorLogState; |
|
|
export const { getState, setState, subscribe, getInitialState } = sensorLogState; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const webpageOriginalOrder = [ |
|
|
|
|
|
{index: 1, redirectedStudyPage: "/study-page-1", redirectedInfoPage: "/in-between-1"}, |
|
|
|
|
|
{index: 2, redirectedStudyPage: "/study-page-2", redirectedInfoPage: "/in-between-2"}, |
|
|
|
|
|
{index: 3, redirectedStudyPage: "/study-page-3", redirectedInfoPage: "/in-between-3"}, |
|
|
|
|
|
{index: 4, redirectedStudyPage: "/study-page-4", redirectedInfoPage: "/in-between-4"}, |
|
|
|
|
|
{index: 5, redirectedStudyPage: "/study-page-5", redirectedInfoPage: "/in-between-5"}, |
|
|
|
|
|
{index: 6, redirectedStudyPage: "/study-page-6", redirectedInfoPage: "/in-between-6"}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const latinSquare = [ |
|
|
const latinSquare = [ |
|
|
[1, 2, 3, 4, 5, 6], |
|
|
[1, 2, 3, 4, 5, 6], |
|
|
[6, 5, 2, 3, 1, 4], |
|
|
[6, 5, 2, 3, 1, 4], |
|
@ -48,14 +38,6 @@ const getLatinSquareIndex = function(participantNumber) { |
|
|
return ((participantNumber - 1) % latinSquare.length); |
|
|
return ((participantNumber - 1) % latinSquare.length); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const findWebpageOrderElementByIndex = function(index) { |
|
|
|
|
|
for(var el of webpageOriginalOrder) { |
|
|
|
|
|
if(el.index === index) { |
|
|
|
|
|
return el; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const findIndexOfOrderElement = function(el, order) { |
|
|
const findIndexOfOrderElement = function(el, order) { |
|
|
for(var i = 0; i < order.length; i++) { |
|
|
for(var i = 0; i < order.length; i++) { |
|
|
if(order[i] === el) { |
|
|
if(order[i] === el) { |
|
|