Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC: Auto-Scrolling to Xerte Quiz Feedback

Auto-Scrolling to Xerte Quiz Feedback 10 months 5 days ago #5586

  • Joel-Xhibit
  • Joel-Xhibit's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
I've recently introduced some JQuery code into Xerte's 'Quiz' template, in order to auto-scroll to feedback once a user has submitted their MCQ answer via the 'Submit' button.

This was done in response to feedback I received from an academic I'm working with, who quite rightly pointed out that our students could easily miss the valuable hints and feedback text (below the MCQ question) on smaller screen sizes.

The fix I implemented was as follows:
// JavaScript / jQuery

$("#checkBtn").click(function(){
    $('#mainPanel').animate({
        scrollTop: $('#feedback').offset().top - 20
    }, 'slow');
});

The code was added on to the slide itself via the 'Script' optional property and the 'Execute' drop-down menu was set to 'Every time page is viewed'.

I've found this useful and wanted to share this with other developers, just in case people wanted to use a similar approach. I'm sure there's even more sophisticated ways of achieving this effect and I'd welcome feedback.

I also use this effect on similar page types.

Please Log in or Create an account to join the conversation.

Auto-Scrolling to Xerte Quiz Feedback 10 months 1 day ago #5591

  • JaapJan
  • JaapJan's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 114
  • Thank you received: 1
Hi

do you have an example of a LO that I can try?

JaapJan
Holy cow!

Please Log in or Create an account to join the conversation.

Auto-Scrolling to Xerte Quiz Feedback 9 months 4 days ago #5626

  • Joel-Xhibit
  • Joel-Xhibit's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
Sure. I've setup an example here . Please note, this method isn't working on all versions of XOT, but I've spoken to one of the core Xerte developers and we're looking at getting this functionality ironed out and added in as standard in the next XOT release.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: jjs
Time to create page: 0.051 seconds
Copyright © 2019 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search