Features & Development

Feature request: sorting free responses for grading

Feature request: sorting free responses for grading

by Rosalie Belanger-Rioux -
Number of replies: 2

Would it be possible to be able to sort through student answers when students are asked to write in a "free response" answer?

In a related manner, would it be possible to somehow be able to mark correct only the answers that were actually submitted? So, when using the "mark correct?" button to give points to everybody, it would do it only to those who actually submitted.

I would like this for my course of 1000+ students, to use the free response feature as a "survey". I would incentivize students taking the survey by making it worth a few points, but only want students who actually wrote something in to get points. (And I don't want to have to give pts to everybody one by one, that would just be too time-consuming and difficult wrist-wise if you see what I mean.)

In reply to Rosalie Belanger-Rioux

Re: Feature request: sorting free responses for grading

by Robert Mařík -

It is possible to check the checkboxes programmatically. Run the following code in Javascript console in your browser.

$("td:not(:contains('There are no answers for this student.'))").next('td').next('td').children().children().attr('checked',true);

Then briefly look if you are satisfied with the result and if so then submit the page. The code should check the checkboxes with nonempty answer. Similarly, the following code hides all empty answers.

$("td:contains('There are no answers for this student.')").parent().css("display","none");

If you will use Javascript console for the first time, you may need to allow some security features as pasting from console.

btw: it seems that the button "Mark All" in fact toggles the state of the checkbox. Is this what we want? The code is

$('.mark_correct').each(function () { if ($(this).attr('checked')) {$(this).attr('checked',false);} else {$(this).attr('checked',true);}});

Concerning the first question (answers sorting in a survey), you can save the html page to local file and then read with some tool capable to extract the data only. For example I use the following R code to find the number of unique answers (as a  first barrier preventing cheating).

library(htmltab)
url <- "Grader.html"
moje <- htmltab(doc = url)
library(dplyr)
moje %>% subset(`Latest Answers`!="There are no answers for this student.") -> moje2
length(unique(moje2$`Latest Answers`))



In reply to Robert Mařík

Re: Feature request: sorting free responses for grading

by Rosalie Belanger-Rioux -

Hi Robert,

thanks so much for your reply! I was able to check all boxes that had a submitted answer, using your code! I'm afraid the rest is over my head, but I'm gonna be ok with just that.

Cheers,

Rosalie