Client side (Javascript) addition of rubric criteria?

mje
Community Novice

Today, adding criteria in rubrics is a cumbersome process requiring a huge amount of mouse-clicks. This wouldn't be a bad thing if rubrics had some built in flexibility but they don't. By example when I add a math assignment with 5 subtasks and I want to re-use 3 criteria for each of the subtasks ... phew ... I just don't do it right now.

Would it be possible to use Greasemonkey for Firefox or Tampermonkey for Chrome or Safari and create a Javascript that can enable teachers to add rubric criteria from a CSV file (or similar)?

 @James ​​shared a javascript enabling easy (manual) re-ordering of criteria, see Sorting Rubrics Made Easy

My suggestion is to start out simple and allow for some hardcoded filenames, and I therefore suggested below pseudo-code (based on the work by James Jones):

waitForKeyElements('.rubric_container.rubric.editing', attachImportRubrics);

function attachImportRubrics() {

// rough idea, non-working code below:

pseudo code: prompt user to open certain csv file (or just use a hardcoded pre-defined filename)

  // I could certainly live with some rough / hardcoded functionality here, it is a lot better than manually modifying rubrics.

pseudo code: open file, make sure it is readable.

var tableRef = $('.rubric_table tbody')

// loop#1 : loop around below code to insert rubric, row-by-row.

pseudo code: read one line from CSV file with rubric criteria (row-by-row)

var newRow = tableRef.insertRow(.tableRef.rows.length);

// loop#2 : loop around below for each criteria column

var newCell = newRow.insertCell(0);

pseudo code: extract (next unread) field in imported CSV line.

var newText = document.createTextNode('some text');  // insert field here instead of this.

  newCell.appendChild(newText)

// end loop #2.

// end loop #1.

}

Do you think this can be done?

James Jones already commented on this - see end of this thread: Sorting Rubrics Made Easy​ - where it was also suggested that the discussion was moved here.

Kind regards,

Michael

0 Likes