@kebbott I'm taking a crack at your questions - first the easier of the two:
For the Canvas Grading Status script add the following bits -
function grades_retrieved(){
var grades_count_1 = {};
$.each(grades_results, function(index, file){
if (file.grade === null) {
file.grade = "No Submission";
}
if (file.grade in grades_count_1){
grades_count_1[file.grade]++;
} else {
grades_count_1[file.grade] = 1;
}
});
if (file.grade === null) {
file.grade = "No Submission";
}
This will check each grade in the object and change it from null to "no submission". You can change that to whatever you like.
var grades_report = '<h2>Grading Summary</h2><table style="width:80%; border: 1px solid black; border-collapse: collapse;">';
grades_report += '<tr style="text-align: left; border: 1px solid black; border-collapse: collapse;"><th><b>Count</b></th><th><b>Grade</b></th></tr>';
$.each(grades_count_1, function(type,count){
grades_report += '<tr><td>' + count + ' </td><td> '+ type +'</td></tr>';
});
grades_report += "</table>";
display_report_grades(grades_report);
}
Here, I added a Header Row before the iteration through the array, because the 'type' output will change based on the grading scheme as well as added basic table formatting including making the table width 80%. If you want full borders, add the style=.... to the data <tr> and <td> tags.
Here's a screenshot of the working script:

I'll take a look at the other script and see what I can come up with!
Cheers,
Chad