JavaScript Final Exam Questions

JavaScript Final Exam Questions

by Brooke Goggin -
Number of replies: 2

Hello Helpful Programming Colleagues,

I have been teaching programming in a variety of languages at the college level since the 90's. I have a challenge that has been presented to me to create several coding final exam questions for a JavaScript course in Moodle. I have read that CodeRunner supports testing in multiple languages. I see a lot of posts about the JavaScript used in the question parameters in other languages but not any sample questions in JavaScript. Can you point me to a few sample JavaScript questions so I can assess the potential? I have a Moodle sandbox to play in starting next week with CodeRunner set up in that sandbox. Thank you in advance for any direction. I have used other live coding testing applications but this is my first journey with CodeRunner and I am intrigued.

Best,

Brooke



In reply to Brooke Goggin

Re: JavaScript Final Exam Questions

by Richard Lobb -

What sort of JavaScript question did you have in mind?

If you're happy to have simple write-a-function questions, where the input data is passed in through the parameters and the function either returns a value or prints an answer with console.log, the out-of-the-box nodejs question type works fine.I attach an example (nodejs_add2.xml).

If you want to be able to read input from the keyboard (which in CodeRunner tests is entered through the Input field of each test case) , see this thread.

If you want students to write JavaScript in conjunction with HTML, e.g. to manipulate a DOM, you have a much harder job on your hands. This thread discusses one approach.

As usual in CodeRunner the first problem is to define exactly what you want the student to do and how you're going to grade their submission. Pretty much anything is possible but sometimes the effort in implementing the ideal question just isn't worth the effort and you have to compromise.


In reply to Richard Lobb

Re: JavaScript Final Exam Questions

by Brooke Goggin -

Thank you Richard. If I have further questions after I play in the sandbox, I will post them here. I will first try the out-of-the-box nodejs question type and then input from the keyboard.