Giter Club home page Giter Club logo

Comments (6)

MPult avatar MPult commented on July 18, 2024 1

Thank you very much, this is much cleaner than my series of 9 if statements.

At what point of time does "endCriteria" become true?

from digitspan.

Thimbleby avatar Thimbleby commented on July 18, 2024

Thank you for your interest!

It has been awhile since I've looked at this code, apologies if I'm rusty, though I am happy to help.

At the end of the test it presents the results, such as in the example below:
image

If you had it download the results, or similar, it would produce the raw data in JSON, including time taken, though I don't think it currently includes any calculated results, unlike the scores shown above.
Are you asking for an automated way of including calculated results, including specifically the first non 100% result in datatosubmit?
Or about displaying that result when the test is finished?

The output that is downloaded is in the variable called 'dataToSubmit' inside the main() function near the end of main.js.
The code controlling the results shown to the user are in the finishText svg lines above it - which start fairly close to the beginning of the main() function.

from digitspan.

MPult avatar MPult commented on July 18, 2024

Yes I want to store the first non 100% result in a cookie (at what question the user did not get 100%)

from digitspan.

Thimbleby avatar Thimbleby commented on July 18, 2024

Assuming you would like it stored when the test is over, rather than ending the test immediately.
I've uploaded some code that should make it easier.

Down towards the end of the code, in the main() function, I print the results of a new function firstIncorrect(). This returns the array indices of the first incorrectly answered response. This means that it starts counting at 0, although note that the first two items cannot be answered incorrectly.

from digitspan.

Thimbleby avatar Thimbleby commented on July 18, 2024

It ends either when every item is completed, or the user's success rate has become consistently extremely low.

The current definition of 'extremely low', is in the later half of the scoreTest() function. In other words, whenever the code calls the function to determine how good the user's previous response was, it evaluates if the test should end early.

This was done to try and avoid situations where low ability users were pointlessly taking test items that just made them feel bad, and didn't give the investigator any new information.

I haven't checked what exactly state I uploaded it in, but the last time I used it I set that early cut-off to be on what I felt was leaned towards giving the user more test items than was necessarily needed.

from digitspan.

Thimbleby avatar Thimbleby commented on July 18, 2024

The number of items - and their length is defined in the questionLengths array. The first sub array are practice items, and the second is real items.

I think in practice for my own use I used
var questionLengths = [[2,3],[3,4,4,5,5,6,6,7,7,8,8,9,9,10,11]];

What you will want to use will likely depend on how much information you want, and how much user's time and patience you want to take up on this test.

from digitspan.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.