Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can javascript be used to grade a multiple choice PDF test?

Guest
Sep 19, 2016 Sep 19, 2016

I'm curious to see if Javascript can be used to grade a multiple choice test automatically with a submit button. Something like comparing the correct answers to an answer key then saving the file with the name and number of questions correct. Or perhaps saving the file with a text field at the bottom with the number of correct answers. I already know how to save with a custom name from a submit button. So all I would need would be the auto grade function if at all possible.

TOPICS
Acrobat SDK and JavaScript
281
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 19, 2016 Sep 19, 2016

That's certainly possible, but you would have to provide the functionality to check the given answers agains your answer key. If you use a good naming convention for your radio button groups, you can access e.g. the given answer for question 1 using the following:

var a1 = this.getField("Question1").value;

You can then test this value agains your answer key and keep track of how many correct/incorrect answers you have in this particular test. You can then e.g. unhide a so far hidden field and add information about this number and the grade to that field.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 19, 2016 Sep 19, 2016
LATEST

Yes, D.P. Story has developed a whole system around LaTex and Acortex to develop mathematical lessons and tests.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines