Comments (7)
I made the following changes in the quiz.js file and successfully achieved the random question generation every time, details are as below:
file location: lms/lms/templates/quiz/quiz.js
Insert the below codes between line 8 and line 9
// Shuffle questions once on page load
let questions = $(".question");
questions = Array.from(questions);
const totalQuestions = questions.length;
for (let i = questions.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[questions[i], questions[j]] = [questions[j], questions[i]];
}
changed line 51, 54, 56, 62 with the following (in sequence order):
51 let current_index = self.current_index;
54 if (self.show_answers) {
56 } else if (!self.show_answers && next_index == total_questions) {
62 $(questions[next_index - 1])
I have checked this with 2 separate students login from different computers and from start to end both had different orders of questions secondly, I also reloaded the browser to start again also the sequence changed.
Please let me know your input.............
from lms.
You can shuffle quiz questions on the latest version
from lms.
There is no such feature in the app. @thida-bcn
from lms.
hello,
will it be in system?
from lms.
can I work on a solution to this issue? @pateljannat
from lms.
can I work on a solution to this issue? @pateljannat
thanks
from lms.
from lms.
Related Issues (20)
- Unable to choose instructor from web HOT 2
- error on creating new site for lms HOT 1
- Date filters in statistics page
- Dark theme for lms portal
- Ability to delete one's question topics
- Pagination for courses list
- Ui: fix header items alignment on mobile device viewport HOT 1
- RTL support for RTL lanuages
- Feature: Show related courses under the course description in the course page
- User vs Total Sign Up HOT 2
- Batch creation from batch HOT 7
- User Input Questions >>
- Annoncement
- When we hide courses from side bar, want to change default page
- Copy should be singular
- Assignment Page - "Save" Button HOT 1
- Introducing filtered view in batches
- Add Support for LMS Installation in Easy Installation Script
- Prevent loading LMS unless user is logged in HOT 1
- Questions for Review
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lms.