Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
General questions and topics about Xerte Toolkits that don’t fit anywhere else.
  • Page:
  • 1

TOPIC:

Using Xerte for training with a quiz? 7 years 9 months ago #4280

  • curryd
  • curryd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 0
I'm working on building a simple employee training module in Xerte. The "owners" of this training want employees to take a quiz at the end and be forced to keep taking the quiz until they pass (e.g., score 80%). And they want to be able to keep track of who's taken the training and passed the quiz.

I know I can do this with an LMS and SCORM. But I don't have an LMS handy, and I'm loathe to expend the effort to spin up an entire Sakai or Moodle instance just for this purpose. (Using our existing Canvas LMS that the students use is not a viable option for a number of reasons.)

Is there a clever way to accomplish this in "pure" Xerte? I was thinking that if I could get the "Interactivity > Quiz" page type to refuse to navigate to the next page unless the quiz was passed I could do something on the following page with Javascript and a RESTful API to receive notice of a "pass", but I do not see a way to get the quiz to only enable the "Next" navigation button when the quiz is passed.

Alternatively, is there some free/open source way to wrap SCORM around a Xerte LO without spinning up an entire LMS? Some PHP module or something?

Any/all suggestions/examples welcome...

Please Inloggen or Create an account to join the conversation.

Using Xerte for training with a quiz? 7 years 9 months ago #4284

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
Disable the forward button on the quiz page (use the Navigation Buttons optional property)

Then in the feedback for the quiz, view the source for the text field and add some javascript along these lines to check if score is over the pass mark and manually enable the button:
<script>
  var myScore = 0;
  for (var i=0; i<quiz.myProgress.length; i++) {
    if (quiz.myProgress[i] == true) {
      myScore++;
    }
  }
  if (myScore/quiz.questions.length >= 0.8) {
    $("#x_nextBtn").button("enable");
  }
</script>
The following user(s) said Thank You: curryd

Please Inloggen or Create an account to join the conversation.

Using Xerte for training with a quiz? 7 years 9 months ago #4287

  • curryd
  • curryd's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 0
Perfect! Exactly what I needed. Thanks!

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ingdon
Time to create page: 0.047 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search