Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to create a quiz #745

Closed
andrewtelnov opened this issue Oct 29, 2017 · 9 comments
Closed

Make it possible to create a quiz #745

andrewtelnov opened this issue Oct 29, 2017 · 9 comments

Comments

@andrewtelnov
Copy link
Member

andrewtelnov commented Oct 29, 2017

Required functionality

  • Disable previous button (done)
  • Enable timer to calculate time spent on survey and on every page (done)
  • Time limitation for survey/page - go to the next page/ complete the quiz + show the time (spent/left) (done)
  • timer panel with progress (done)
  • Right answers (done)
  • Answers cost and score calculation
@andrewtelnov
Copy link
Member Author

The demo has been created: https://surveyjs.io/Examples/Library/?id=survey-quiz

@tizzo
Copy link

tizzo commented Nov 21, 2017

Looks like the react version isn't working atm. I'm currently evaluating libraries to use for a quiz build, this work is exciting!

@andrewtelnov
Copy link
Member Author

@tizzo I have fixed the issue. It is working now.

Thank you,
Andrew

@tizzo
Copy link

tizzo commented Dec 10, 2017

I'm currently working on a quiz system based on surveyjs. I'm implementing Right answers like this for the simple cases:

 {
   type: 'radiogroup',
   name: 'SurveyJS is a lot of fun',
   choices: [
     {
       value: 'true',
       text: 'True',
       correct: true,
     },
     {
       value: 'false',
       text: 'False',
     },
   ],
 },

And I'm implementing a simple answer cost and score calculation system. I'm supporting most of the question types provided by surveyJs so there's handling for different question types but in essence I'm doing similar to the following (but with a bunch of different plugin classes that wrap corresponding survyejs question objects).

let correctAnswers = 0;
let totalAnswers = 0;
for (let question of survey.getAllQuestions()) {
  for (let choice of question.activeChoices) {
    if (choice.correct === true) {
      totalAnswers++;
      if (question.value === choice.value) {
        correctAnswers++;
      }
    }
  }
}

I wonder whether you could share more about your roadmap and the architecture for question correctness, grading, providing feedback, etc. Thanks and again I love your work!

@andrewtelnov
Copy link
Member Author

Hello @tizzo,
We are working on release v1.0 right now. We are pretty close.
We have the question cost and right answers in our TODO list to finish with Quiz completely, but we have decided to postponed it.
I can't tell your the precise time frame. We may work on it in January, but I can't garantee this.
Anyway, if you have any difficulty of implementing what you want, just let us know and we will help.

Thank you,
Andrew

@tizzo
Copy link

tizzo commented Dec 10, 2017

Thanks @andrewtelnov! Yeah, we need to have something working this week. Would love to find a way to contribute my own answer to this problem but I think it's probably not totally a generalizable solution as I'm building something around SurveyJS rather than into it for this specific use case.

@andrewtelnov
Copy link
Member Author

andrewtelnov commented Dec 26, 2017

Added:
question.correctAnswer, survey.getCorrectedAnswers(), survey.getInCorrectedAnswers() and the following completedHtml is possible:
"You have answered correctly {correctedAnswers} on {questionCount} questions. {inCorrectedAnswers} answers are incorrect."

@skeary-immt
Copy link

Hi,

The ability to do quizzes looks really useful :)

I was looking through the changes and noticed a couple of typos or grammar issues:

  • getCorrectedAnswers() should probably be getCorrectAnswers() or perhaps, even better, getCorrectAnswerCount() as the function returns the count and not the actual answers.
  • Similarly, getIncorrectedAnswers() should probably be getIncorrectAnswers() or perhaps, even better, getIncorrectAnswerCount().

Hope you don't mind me making these suggestions and that they're helpful. I also noticed a couple of functions on the Page object that looked like they could be tweaked:

  • Page.hasShown() to Page.hasBeenShown() or Page.wasShown().
  • Page.isQuestionsRandomized() to Page.areQuestionsRandomized()

Cheers,
Simon

andrewtelnov added a commit that referenced this issue Jan 2, 2018
@andrewtelnov
Copy link
Member Author

@skeary-immt I have modified/added properties names.

Thank you,
Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants