Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am developing a Quiz module in which a user can create a quiz based on a large set of questions grouped on categories. But he can also repeat a certain quiz, or view it again read only.
The application is written in Angular but this questions is more about the structure so I guess it's applicable to any MVC technology.
I have first a QuizCreateController which handles the quiz creation/selection.
QuizCreateController
So the user can create a Quiz, selecting one or more categories (at selection I gather all the question IDs based on what he selected). Then he can press the START button and he will be redirected to a new view in which he can answer each question one by one.
START
angular.module('quiz').controller('QuizCreateLevel1Controller', QuizCreateLevel1Controller); QuizCreateLevel1Controller.$inject = ['$stateParams', '$state', 'QuizStore', 'QuizContentStore', 'Config']; function QuizCreateLevel1Controller($stateParams, $state, QuizStore, QuizContentStore, Config) { var vm = this; var selection = []; var questionIds = []; var contentCollection = null; vm.selectedContent = null; vm.selectedBook = null; // this will be updated when the questions are loaded vm.currentNrOfQuestions = 0; vm.currentQuestionTime = 100; //methods vm.selectBook = selectBook; vm.toggleSettings = toggleSettings; vm.createQuiz = createQuiz; // select a book from the grid function selectBook(book, content) { vm.selectedBook = book; vm.selectedContent = content; QuizContentStore.setSelectedContent(content.sourceContent); selection = [book.sourceBook]; updateNumberOfQuestion(); } function updateNumberOfQuestion() { questionIds = vm.selectedContent.sourceContent.getQuestionsIds(selection); console.info('Total number of questions: ' + questionIds.length); vm.maxQuestion = questionIds.length; vm.currentNrOfQuestions = questionIds.length; } function toggleSettings() { vm.settingsCollapsed = !vm.settingsCollapsed; } function createQuiz() { var obj = { content: vm.selectedContent.sourceContent, questionIds: questionIds, bookReference: vm REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.