The School for Champions is an educational website that shows you how to achieve your dreams.
![]() |
|
|
Explanation of how to use JavaScript to provide a multiple-choice test that includes calculating the grade. Also refer to computer-based training, CBT, web-based training, WBT, intranet-based training, Ron Kurtus, School for Champions. Copyright © Restrictions Graded Test Using JavaScriptby Ron Kurtus (revised 9 January 1998) Do you want to give your students or trainees an online test that automatically calculates the grade? Using JavaScript provides an easy way to do that. Questions you may have on this subject are:
(You can jump to to specific answer or simply read the text in order.) This lesson will answer those questions. There is a mini-quiz near the end of the lesson. Sample testJavaScript codeThe following code was used in programming the test. (You can also examine the HTML source material). Script languageThis material can be placed either under <head> or directly under <body> within your HTML. The bracketed numbers after elements relate to the correct answer. The 9 answers for the three questions in this test are listed as 0, 1, 2...7, 8.
Form materialThe JavaScript code for the actual test is always within <body> of the HTML.
Problem areasThere are a few problems with using JavaScript. Not included in the code is a form for the student to input his or her name, as well as a way to send the test result and name via e-mail to the instructor. That code will be included at a later date. Also, this type of test is not perfect.
SummaryUsing JavaScript in this way is a simple method to give an online test to students and to have the grade automatically calculated. But there are some problems and refinements to be made. Keep things simple -- but not too simple ResourcesThe following are resources on this subject. WebsitesBooksMiscellaneousMini-quiz to check your understanding1. Why is classroom training considered part of eLearning? 2. What disadvantage is there to self-paced eLearning? 3. Why would you have a classroom session in blended sales training? If you got all three correct, you are on your way to becoming a champion in eLearning development. If you had problems, you had better look over the material again. What do you think?Do you have any questions, comments, or opinions on this subject? If so, send an email with your feedback. We will try to get back to you as soon as possible. Share linkFeel free to establish a link from your website to pages in this site. Or use our form to send this link to yourself or a friend. Students and researchersThe Web address of this page is Where can you go from here?
|
The School for Champions helps you become the type of person that can be can be called a Champion.