Importing Rubrics from a Spreadsheet

James
Community Champion
139
83601

I've written an Rubric Importer user script that will allow you to copy a rubric from a spreadsheet like Excel or Google Sheets and paste it into a textbox inside Canvas and then automatically turn it into a rubric within Canvas. Many feature requests have asked for improving the rubric experience and https://community.canvaslms.com/ideas/6311-allow-importing-of-rubrics-from-csv-format  is currently in the Gathering Information stage.

Canvas rubrics only allow for simple designs. You can have a criterion, a longer description, and then a series of single line ratings and a point value. Point values must be in descending order and they can't be negative. The input box where you type the rating doesn't wrap and so if your rating description is longer than what will show, you have to scroll back and forth to see the whole thing. Moving rows around in a rubric is not possible unless you use a script like the one I wrote about in Sorting Rubrics Made Easy‌.

The Rubric Importer script allows you to design the rubric in a spreadsheet where you still have the same basic limitations as to layout, but now you can resize columns or rows and wrap text and move things around in the spreadsheet. Then when you're done, you just copy and paste the rubric into a form in Canvas and the script creates the form needed to turn it into a rubric.

The rubric creation form is an undocumented call. It is not part of the Canvas API and you need to be logged into the web interface of Canvas in order to use it. It is basically a wrapper around the Canvas form that takes a tab-delimited input and sends the data to Canvas to create the rubric.

Creating the Rubric in the Spreadsheet

Block Rubrics

This is a new feature for version 2 of the script.

It allows you to specify the points on one row and then use them for rows that come after that. Here is the rubric that originally took me 5 minutes to clean up to the original format. Notice that the ratings are in the wrong order since Canvas wants them in descending order (largest on the left to smallest on the right). The script automatically reverses them if necessary to put them into the correct order.  This block can be pasted into the script as-is without any modification.

Rubric Example

Are your rubrics a little more complicated and don't have everything exactly the same point values? The Block means that you can block your rubric into sections and have different point values and different number of ratings for each blocks. Any empty cells to the right of the block are skipped, and a block could have just a single row of ratings in it. The blocks are independent of each other, so some can be in ascending order and some can be in descending order. 

Here's another rubric that you could copy and paste directly into the script.

Rubric Blocks

You can even have sparse rubrics by leaving out ratings if they don't apply to that particular criterion.

Leave Out Ratings

None of these have a long description, but you could add it after the Criteria column. If there is something in that column then it will use it, if there isn't then it will be ignored.

You can also link to outcomes, although you'll have to look up the outcome IDs yourself. The simplest place to put them is at the right of the spreadsheet outside of any rating columns, but they can appear in other places. 

Here is the version of the block rubric that I used for testing purposes. Notice the heading row does not contain the point values and that there is nothing to the right of the point values.

Block Rubric Example

The highlighted cells reference outcomes. I don't recommend that you make your rubric this messy, I just wanted to test it with a bunch of different varieties.

Here are the guidelines.

  • The headings are completely optional and will be skipped if included in the first row of what you paste into the script.
    • The criterion name must be in the first column.
    • The long description is optional, but if you have it then it must come in the second column. You can omit long descriptions for any criteria that don't have it.
    • The rating point values need to come next and they must be the last thing on a row. They are not recognized as rating points if there is extra information after them on the line. There does not have to be anything before the rating points, but it is okay if there is (it's ignored).
    • The first rating point value must be on either the first or the second line and must come before you use it. If it hasn't found a rating points line by the second line, it decides the table is not in block form and moves on to the flexible form.
    • Outcomes should come last, making sure they don't exist in a column that is assigned a point value. Be careful if you're using tables with Excel and you add outcome information as Excel will add column labels for you and if your points are on the first line, those extra column names will cause the rating points to go undetected and you won't be able to import your rubric.
    • If the outcome ID is in the criteria name column or at the end with a blank criteria name, then the name of the criterion will be taken from the linked outcome. This is the way that Canvas does it, but it doesn't give you the chance to change it. If you specify a criterion name or long description and link to an outcome, then the information that you supply will be used instead of the information from the linked outcome.
    • If you use outcomes, you can specify whether or not to use that for scoring in the next cell to the right. A 1 means use that linked outcome for scoring and a 0 means do not use it for scoring. The default is 1, which matches Canvas' default.

    Before using the script, you will need to highlight (select) the text inside the spreadsheet. When you do this, you can skip the heading row (or include it). After selecting the text, copy it. The keyboard shortcut is Ctrl-C (PC) or Cmd-C (Mac).

    Flexible Rubrics

    A rubric is checked to see if it is in block form first and if a suitable points line cannot be found in the first two lines, it falls back to this method.

    The original release of this script required a fairly stringent form in the spreadsheet and did not support outcome associated criteria. Here is the example nonsensical rubric that it was originally tested with. This format still works.

    Flexible Rubric

    Here is the spreadsheet that version 2 was tested with.

    Rubric Spreadsheet Example

    The highlighted cells reference outcomes. I don't recommend that you make your rubric this messy, I just wanted to test it with a bunch of different varieties. The one thing I want to point out is the "Did you still feel tired ..." in line 16. It is in the Long Description column of the spreadsheet, but it came out in the Criteria column of the Canvas rubric. The column headings are completely ignored by the script, they are only there for you to help put some order to your rubric. I recommend not even copying them into the script.

    Here are the guidelines.

    • The long description is optional and may be omitted on a row-by-row basis. You don't have to include it at all and you do include it, you don't have to include it for every row. I could have even moved the ratings in the Grade row to the left one cell and it would still work, although I don't recommend that while designing the rubric.
    • The headings are completely optional and will be skipped if included in the first row of what you paste into the script.
    • Every rating has two cells and must come in pairs. The first cell (left) is the rating description and the second cell (right) is the point value. The point value should only contain the number, it should not have extra text like "pts" or "points" in it.
    • Rows can have different number of ratings in them. Any blank cells at the end of a row are removed and ignored.
    • The point values can be in ascending order or descending order and the script will put them into descending order, which is what Canvas requires.
    • You'll have to look up Outcome IDs on your own and put them into the system. They can come first in the row, replace the criterion name or the long description, come at the end of the row, or in some cases, be split between the front and end of the row.  For simplicity sake, I recommend the beginning or the end.
    • If you specify a valid outcome ID, then it is looked up and any ratings for that row are replaced by those from the outcome. If you have a criterion name or long description, it will use those instead of the values looked up from the outcome (Canvas replaces them with the information from the linked outcome and doesn't give you the option to change it). If you leave off the name or long description, then it will use the information from the linked name.
    • You may specify a 0 after an outcome to say make this worth zero points. This is the Canvas equivalent of ignoring the outcome for scoring in your rubric. The default is to include linked outcomes in the scoring.

    Although no limit on the number of ratings is enforced by the code, people have said there are problems with you have too many ratings in the rubric. This does not address that and if it doesn't look good or work right when you create it inside Canvas, then it won't here either.

    Before using the script, you will need to highlight (select) the text inside the spreadsheet. When you do this, you can skip the heading row (or include it). After selecting the text, copy it. The keyboard shortcut is Ctrl-C (PC) or Cmd-C (Mac).

    Importing Outcomes

    When the script was originally written, it didn't support linking outcomes. I argued that there was no easy way to tie the information in the spreadsheet to the outcomes in Canvas. Since then, I thought of a way to manually link them, but it requires that you look up the outcome ID inside Canvas and then transfer that number over to the spreadsheet manually.

    Of course, you don't have to use outcomes at all.

    Finding the Outcome ID

    Begin by going to the Outcomes page of your course or account. Then follow these two steps.

    1. Navigate through to find the outcome that you want to import.
    2. Mouse over the name of the outcome and look at the address of the hyperlink in your browser.

    Find Outcome ID

    If your browser doesn't show the address when you mouse over it, you can go ahead and click on the Outcome name and then get the outcome ID from the location.

    Find Outcome ID in URL

    Please be careful typing in the Outcome ID. The system does not show you what the rubric will look like before it sends it, so double check. The outcome will be imported into the course if it does not already exist, so putting in a wrong ID may bring in the wrong outcome.

    Use Criterion for Scoring

    When you import a criterion from an outcome using the Canvas interface, it asks you if you want to use this criterion for scoring. The default is checked, which means that the criterion will count in the rubric points. Sometimes you want to measure an outcome without having it directly affect the score, so you uncheck this box.

    Use Criterion for Scoring

    For the script, the default when you include an outcome is the same as it is Canvas. That is, by default, criterion linked from outcomes will be used for scoring. If you do not want this to happen, then you should enter in the cell to the right of the outcome ID. The script will pick that up and pass it on to Canvas.

    Although the default is to use the criterion for scoring, if you plan on using some for scoring and some for not scoring, I suggest that you be explicit with a 1 for scoring and a 0 for not-scoring. It will help keep the sheet more aligned and easier to understand.

    Overriding Outcome Information

    When you import a criterion through the web interface, it copies the name of the criterion, the long description, the rating descriptions, and the rating points over from the associated outcome. On top of that, you can't edit any of those.

    However, if you go through and rename the outcome or modify the long description, it does not change the name or description in the rubric. That gave me the idea to allow the user to specify a different name or long description than what the outcome had. Since we're using an undocumented non-API call to create the rubric, Canvas could change that behavior at any point and without notice. But for the time being, you're not stuck with the name on the outcome.

    For example, the name of the outcome above was "2.2a: Solve problems by performing deductive and inductive reasoning." and the long description was the same. I didn't come up with those, that's part of our cross-disciplinary outcomes. But let's say that I wanted to include it on a rubric and everything else was designed by me and has a short name for the criterion so it doesn't push the squish the rest of the rubric to the right. Using this script, I could rename it to be "Reasoning" and either leave the original long description that came from the outcome or change that as well.

    The basic rule is that if you put something in the name or long description fields of a linked outcome, then it will use what you put in there. If you don't specify that information, then it will use what comes over from the outcome.

    The ratings are transferred from the outcome and there is no way to stop that. Since mastery can be tied to the point values, I didn't want to mess with that part of it. You can leave off the ratings completely when you are specifying an associated outcome. A line with just a single number on it will be interpreted as a linked outcome that should be used for scoring.

    Detecting Outcome IDs

    The script looks for Outcome IDs by trying to match the text in a cell to positive integer. This means that if you're in a place where there might be an outcome ID, that you can't have a criterion with an integer ID. I doubt that many people do that anyway, but just in case you're in the habit of naming your criteria 1, 2, 3, etc., you're going to run into trouble trying to use the script as it's going to complain that it can't find outcome IDs 1, 2, or 3 when it runs. Spaces are trimmed from the beginning and end of all cells, but you could add a decimal point and call them 1., 2., 3., etc., or even #1, #2, #3, etc., and then it would not detect it as an attempt to link to an outcome. If you absolutely must have 1, 2, 3, etc., then you could create them with dots and then go through manually and edit the criterion names to remove the dots.

    The simpler you keep the script, the better job it will do at figuring out what you want it to do.

    Using the Script

    The script only runs from the rubrics page. For a course, this means you go to Outcomes, click the more icon on the right, and then choose Manage Rubrics. For an account, there is a Rubrics button in the navigation menu that will take you there. The location (URL) ends in /rubrics.

    It adds a new Import Rubric button underneath the Add Rubric button.

    Add Rubric

    Click the Import Rubric button to open the modal dialog box. I've resized it here, but it takes about 80% of the screen width.

    Import Rubric

    1. Type the name of the rubric into the Rubric Title box.
    2. Click in the Rubric Contents box and paste the rubric that you copied from the spreadsheet. The keyboard shortcut is Ctrl-V (PC) or Cmd-V (Mac). Note that it will not look right when you paste it, but it's okay.
    3. Click the Create button.

    Here's what my example looked like before I hit Create.

    Import Rubric Example

    If everything is successful, the page will reload and your new Rubric will appear in the list of rubrics.

    Course Rubrics

    The Canvas script shows the rubric on the page after you click their Create Rubric button. My script bypasses their form completely and just sends the information directly to the Canvas servers. The page must reload to list the rubric and the command to reload the page is automatically sent for you when the script successfully runs.

    You can then click on the rubric title to see the rubric, just like you can with any other rubric you have.

    A Demo Rubric

    What if it doesn't work?

    There are some error messages that may occur. They will definitely occur if you don't follow the guidelines. They will look like this after clicking the Create button.

    Rubric Error

    Here are some of the error messages you may see.

    • Only one rating found in line #. This happens if you're using the block rubric and only specify one rating.
    • Invalid content at the end of line #. This happens if you're creating a block rubric and have specified an outcome in the early part of a rubric and then you have information to the right of the ratings points. The program expects that this will be a 0 or 1 to indicate the scoring, but you have something else in there instead.
    • Rating without associated points at end of line #. You have an entry to the right the points block, but it's not an outcome.
    • Empty rating description in line #, column #. This happens in the flex form of a rubric and it's expecting a description for the rating, but the description is blank.
    • Second item in pair is not a number in line #, column #. This is a companion error to the empty rating description error. It is trying to find a point value, but it cannot find any.
    • Unbalanced rating/points at the end of line #. This happens in the flex form of the rubric when you have extra information on the right that cannot be tied to an outcome.
    • Conflicting directives for using outcome for scoring in line #. This happens in the flex form of a rubric when you tell it how to handle scoring of a linked outcome at the beginning and again at the end of a criterion line.
    • Unable to locate outcomes: #. You must manually look up the Outcome IDs for any outcome that you want to use. Sometimes we get it wrong as we transfer it over. This message will happen when Canvas is unable to locate the outcome. This could also happen if you're having a bad internet day as I've put a 3 second timeout on the lookup. I didn't want people to think the script wasn't doing anything and click the Create button a second time. This could also happen if you name your criteria using non-negative integers. See the section on Detecting Outcome IDs for more information on this.
    • You must provide a title for your rubric. This happens when you didn't enter a title in the form's Rubric Title input.
    • You must paste your rubric into the textbox. This happens if you left the Rubric Contents box empty.
    • All the information was supplied correctly, but there was an error saving rubric to Canvas. This error happens when there is a failure trying to submit the form to the Canvas servers for processing. You can try again later or you can look at the JavaScript console within the browser to try and see if you can find out why.

    There are also two errors that you should not get if you're running my code as intended. If someone modifies the code or installs it globally for an institution, then it might occur.

    • No association specified, refusing to create rubric object. The script tries to determine whether you're creating a course rubric or an account rubric and the ID that goes along with those. Normally, it has no problem because the only pages where the script runs are also the pages that supply that information. However, on the off chance that something dreadfully wrong should happen, it is impossible to create the rubric and you'll get this message.
    • Unable to determine where to place this rubric. This is the same error as No association specified, refusing to create rubric object. The only difference is where it's called internally. This one occurs when it tries to determine the association and the other is a check to make sure someone didn't call the script to actually process the input without also supplying the association. If you're using my script, the No association error should never be returned as this error will keep it from getting that far.
    • Unable to create criterion for line #. I think I have most of the error checking done before it ever attempts to create the criterion for a row, but this is just in case I missed something.

    If something does go wrong, then fix it in the spreadsheet and copy/paste it again. The textbox in the form is not suitable for editing.

    Version 2 of the script represents a major update that more than doubled the number of lines of code and made it considerably more complex than the original version. As you can see from the examples, I tested it with many variations, but there are probably cases I didn't try. Try to keep things as simple as possible. While specifying the outcome in the middle of the criterion line should work, it's more complicated than if you put it at the front or end. If you find something that isn't working and you can't figure it out, please let me know.

    Video Demonstrations

    Importing from Excel

    The rubric in this video was already in Excel, but it only had the total point values at the end of the rubric. Everything in the first column was full points, values in the second column were 50%, and ratings in the last column were worth 0. This video shows how to insert the needed columns, put in a formula to calculate the 50% of the values, and then copy/paste it into the script and create the rubric.

    The rubric has 19 criteria with 3 ratings for each. The total time to place the rubric in the proper format in Excel and then create the script was 1:07.

    Importing from Word

    Importing from Word is not supported directly, but you can copy/paste from Word into Excel and then make the changes in Excel.

    The rubric had 6 criteria with 4 ratings each and it took me 5:00 minutes to manually create the rubric from Word. Thankfully triple clicking will select the text in a table cell or it would have taken longer. It took me a while to get into the groove and originally forgot to change point values or put things in the wrong order. You know, all those things that happen when you manually create a rubric using the Canvas interface.

    I then created the rubric using my script. The rating values were in ascending order so that had to be reversed. The rubric entries had a row that had hard returns in them in Word that got broken into two rows when transferring to Excel. The rubric script will only accept and ignore a single header row at the top. I fixed the double rows, but didn't have to since copying the header is optional anyway. After bringing the rubric into Excel, I moved the columns around and added the point values to put it into standard format for the script. I then copy/pasted the table without the headers into the script and created the rubric. The total time from starting the copy from Word to clicking the Create button was 1:26.

    Note that the information in this video is now superseded by the ability to create block rubrics. This feature was not available in the initial release. It will be even faster now than this video shows.

    Known Limitations

    There are some known limitations with this script. It was designed to be a quick way to get a simple rubric into Canvas. Major changes happened with version 2 a week after the initial release that allow for some complicated behavior.

    Creation Only (no append)

    This script does not append rows to an existing rubric, it creates new rubrics. You would need to get the existing rubric into Excel and then add the news rows. You would then have to create a new rubric inside Canvas.

    No Editing / No Sorting

    This script creates rubrics. If you want to edit them, you'll need to use the built-in capability of Canvas. If you want to rearrange the rows in an existing rubric to move criteria around, then see the Sorting Rubrics Made Easy‌ script.


    Downloading Rubrics from Canvas

    You can highlight a rubric in Canvas and copy/paste it into Excel. However, the format it comes across is not compatible with the format of this script. User scripts run on certain pages and the page that the download would happen on is a different page than the page that handles the creation. That would need to be handled by another script.

    Creating Rubrics from Assignments

    This script does not allow you to import rubrics from an assignment page where you can add a rubric to an assignment. This script bypasses the form that gets created when you create an assignment and it doesn't handle the attaching to an assignment that would have to happen if it was done there. Instead, you'll need to go to the rubrics page and add it there and then attach it to the assignment after it's been imported.

    Installation

    Quick Install

    For those power users who are impatient, here are the quick install steps.

    1. Install Tampermonkey for Chrome, Firefox, or Safari
    2. Install the Rubric Importer user script.

    If you run into problems, be sure to go back and read the instructions.


    Custom URLs

    The script automatically runs on any page that matches *.instructure.com/courses/*/rubrics or *.instructure.com/accounts/*/rubrics. This are the main rubric pages for courses and accounts when your site is hosted by Instructure without a custom URL. If you have a custom URL, like canvas.university.edu, then you will need to modify the script to get it to work.

     

    To make this change in Tampermonkey, click on the Tampermonkey Icon, choose Dashboard, and then click on Rubric Importer. Then change the *.instructure.com in the // @include statements on line 5 and 6 to match your instance and save your script.

    139 Comments
    djohnson13
    Community Explorer

    Huge thanks for your script @James 

    I've been commissioned to get our whole schools Achievement Standard Rubrics on Canvas and this is a God send for my work load.

    Keep up the awesome work.

    James
    Community Champion
    Author

    You're welcome, @djohnson13.

    JenWhalen
    Community Explorer

    Hello!  Is there any way to use this script to insert visual dividers into the rubrics?  I'm working on converting our Dental Hygiene grading sheet into digital forms, and am working with rubrics with 50+ criteria in 10-ish different categories.  The faculty are complaining of how long it takes to scroll and look for the item they want.  Is there any way to, say, color-code the different sections?  Add a different-colored "header bar" between them?  Other ideas?  Attaching more than one rubric to an assignment would work just fine, but sadly we don't seem to be able to do that, either.  Thank you!

    James
    Community Champion
    Author

    @JenWhalen 

    There's nothing that this script can do directly to handle that. It just facilitates creating the rubric inside Canvas.

    This is a question that @Chris_Hofer has examined in the past. Chris will probably have a more elegant solution than I have since I don't get fancy with rubrics.

    You could create fake outcomes for each of the headings and include them in the rubric. Make sure you do not count them for points. Then you write CSS that looks for rows that are outcomes and applies the correct styling to them.

    While that sounds easy, unfortunately, that won't work. To know that something is an outcome or that there are no points associated with it, you have to look deep into the structure and then back up several layers of HTML to apply the styling. That cannot be done with CSS, it would need JavaScript. That would mean you would need to watch for pages where the rubrics can be filled out (SpeedGrader for one), possibly wait for the rubric to be generated (use MutationObservers to watch), and then apply the styling. I've written some code called QuizWiz that acts on SpeedGrader and will automatically open a rubric back up when grading, so borrowing code / ideas from there might be one place to get started. By the way, I spent 6 months developing that (okay, a couple of those we being blocked and not being able to move forward, but it was still substantial development time).

    That's not meant to scare you off (completely), but that there might be a better way to do it. It might be easier to write your own rubric system that looks the way you want it to, let someone fill that out, and then write the responses back into Canvas (if they have to be there) through the API. It might even be a case of not needing the results inside Canvas directly, but just trying to leverage what Canvas had available. If I was writing my own form for something that long, I would probably use some kind of collapsible sections or tabs to block them off into groups.

    If you don't want to go the fake outcome route, then could preface each criterion with the section and then use JavaScript to go through and look for where those change and stylize them based on that. You still have the issues of writing the script and getting it to run in the proper locations, though.

    The first approach would still have a rubric criterion that you would have to fill out. The second way wouldn't.

    I think that at one time Chris might have also suggested using a 0.01 and 0.00 point criteria for those header rows. All of the thought that I've put into the question over the years has been as his request, so I'm considering him the expert on it.

    Chris_Hofer
    Community Coach
    Community Coach

    @JenWhalen ...

    I would agree with @James.  There is no way to do any kind of color-coding...at least not on the end-user UI.  If you create an outcome with two point values (you can use whatever points you want) and then put that outcome in your rubric (making sure to not count it towards the total score), you can essentially use it as a header.  The other thing you can do is to create a normal criterion row (not in outcomes) and assign two ratings with a zero score.  This seems weird, but it should work.  You wouldn't be scoring that row at all in the SpeedGrader.  And, if you did click on either of the zeros when doing your grading in SpeedGrader, I believe it would highlight them both.  Again, kind of weird.

    Hope this helps.

    JenWhalen
    Community Explorer

    @James@Chris_Hofer 

    Thank you both for your replies!  I really appreciate it. 

    I've tried the "criterion as header row" in the past, and the faculty were not in love with it.  Though it just occurred to me that, in addition to using different points-systems for the headers, I might input some/all of the title text as non-letter characters. ***********, for example, all the way across.  That might differentiate the sections more easily.

    I'll make up a couple examples, and show the faculty.  It's hard to tell at this point whether they're pushing back just because "it's different", or because it's objectively awful, lol.  I've also floated the idea that Canvas doesn't do what you want it to do; we may need to look elsewhere.

    thanks again!

     

    scombs426
    Community Participant

    I've tried to access the sorting rubrics made easy and the link is broken in both places I tried from this blog post is it no longer available?

    Chris_Hofer
    Community Coach
    Community Coach

    @scombs426 ...

    The links in James' posting may not work because he wrote this blog posting prior to the Canvas Community changing platforms in Summer 2020.  The good news is, that link can be found here: Sorting Rubrics Made Easy.  Or, you can use the search box at the top of any page here in the Community to type in the name of the liked page.  When I typed in "Sorting Rubrics Made Easy" into the search box, it came up as the first result.

    Hope this helps a bit.

    mbermonti
    Community Novice

    It is hard to put into words the magnitude of my gratitude right now!!

     

    I was in the middle of a painful session of manually creating a rubric when I accidentally deleted it by pressing cancel instead of save (sloppy mouse movement).

     

    I tried your script and it worked beautifully right off the bat.

     

    Thank you so much!!

    shh1cd
    Community Explorer

    James! 
    You are a kind of man I am looking for. 

    I hate a repetitive task as well. 
    You mentioned that you learn a programing language to write this 
    script. What kind of language are you referrring to? 

     

    Best Regards

    Sammy 

    dralcohen
    Community Member

    I'm in the process of transferring a course to Canvas. Part of that is a large set of long, complex rubrics. I got through about half of the first one before my wrist started complaining from all the mouse work.

    In short, this looks like just what I need. Thank you for putting it together!

    Unfortunately, I can't get it to work. It is installed. I see the Import Rubric button, but when I click on it, nothing happens. There are no error messages.

    Any advice for troubleshooting? I'm not even sure where to start.

    Thank you.

    EDIT: Sigh, never mind. Of course, I got it to work about 5m after I posted this. I'm not 100% sure what I changed. If I figure it out, I'll post here.

    paul_fynn
    Community Contributor

    @James fantastic work - always amazed at your work rate and equally astonished that your groundbreaking work doesn't find its way into Canvas releases more quickly.

    I have a major project involving several thousand outcomes, and the easiest way to deploy these is through rubrics as templates.

    • Does the original still work with the 2023 Canvas releases and Outcome improvements please?
    James
    Community Champion
    Author

    @paul_fynn 

    Thank you for the kind words.

    I haven't used the rubric importer since April, but it worked then. I haven't seen any changes coming down that would break it. I suspect if it breaks, someone (or multiple someones) would let me know.

    For outcomes itself, there is already the ability to import a CSV file. I suspect that if Canvas ever does a rubric import, that it will be a CSV file. That allows them to add it to the API where there is no copy/paste capability.

    James
    Community Champion
    Author

    @shh1cd

    Sammy, sorry for the delay in responding. If people don't @ mention me, I usually don't see the messages.

    I used JavaScript for this as it is what runs inside the browser.

    paul_fynn
    Community Contributor

    Thanks @James ,

    The vagaries of Outcomes and Rubrics construction become clear when attempting to i) work at scale and ii) to establish the behaviour of Outcomes and the different places in which Outcomes are listed in a Canvas course, the fields which appear, and the impact of removing imported outcomes from Rubrics (it appears that Outcomes deleted from an assignment Rubric in a course continues to be appear in the course list unless manually deleted as a Course Outcome). I'll try and document some of the other issues when we get far enough into our project.

    I'll get one of my more technical colleagues to try out the rubric importer and see how it goes.

    I'd be interested to pick up offline with anyone that has experience of using the State level outcomes at scale for a more in depth discussion and experience sharing ...

    Prof_Barankin
    Community Member

    @James 

    Yeah I can't get it to work anymore (whereas I was using it every Fall thru 2022). When I click on import rubric and paste then click "Create" it just sits there, and doesn't give an error message or anything... (FYI: my rubric has criterion, longdesc, and 5 ratings/pts columns)

    Are there any banned characters (e.g., I use /, ", and Δ in some long descriptions)?

    (P.S. TYSM for this and all the other things you've written for the community--I've been using several of them for years!!!)

    James
    Community Champion
    Author

    @Prof_Barankin 

    There shouldn't be any prohibited characters as long as it's UTF8. At least I didn't see any in a quick glance at the code.

    I tried to send you a direct message with my email address so you could send me the rubric in question so I could test. However, you don't have private messaging enabled so I wasn't able to.

    Is there a chance you could attach your rubric spreadsheet to a message here?

    If you don't want to share your rubric with the community, you can enable private messages and then I'll give you my email address. Or go to your account (top right), click my settings, on the top row switch from Personal to Preferences, then on the second row choose Private Messenger and turn on private messages. Then either private message me your email address or let me know and I'll send you mine.

    Prof_Barankin
    Community Member

    No problem (although I'll be more than a little embarrassed if it's just a formatting issue...)

    FYI: I have several categories valued at 0 because this is a draft assignment... (LMK if you prefer an actual file attachment instead of copy/paste)

    Criterion LongDesc Rating1 Pts1 Rating2 Pts2 Rating3 Pts3 Rating4 Pts4 Rating5 Pts5
    ALL-1 Front sections: Title page, Table of Contents, Lists of Figs/Tables well-formatted, complete, correct Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    ALL-2 Report is well structured (Intro, Background, Alternatives/Recs, Discussion, Concl) Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    I-1 1-page Exec. Summary: covers all results of full report, including important details and relevant numeric results Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    I-2 Exec. Summary is well-formatted, effectively communicates main points of report Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    II-1 Design metrics (in decision matrix) are well-formulated, appropriate, justified, and clear Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    II-2 Reasonable pricing choices for feedstocks, products, solvents, catalysts, and utilities Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    II-3 Utilities completely described (including T/P's, pricing, etc.) Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    II-4 Standards & Regulation appropriate and detailed (for final 2 processes) Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    III Background provides complete and relevant state-of-art (competing tech) Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    IV-1 Discarded models described (briefly) with justification for rejection Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    IV-2 Major design choices during model development defended (reasonable), basic I/O or BFD for all 3 Excellent 30 Good - some minor issues 24 Flawed - Major Issues 18 Extremely Poor - Multiple Major Issues 12 Not addressed / Not included 0
    V-1 Models include all necessary UOs (ΔP = pump/compressor/valve, ΔT = HEX, etc)j, duty calculations are accurate (or follow heuristics) Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    V-2 Evidence of efficiency-improvements (e.g., heat integration) which demonstrate reduced costs or higher production Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VI-1 Processes are compared fairly and accurately on their technical performance Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VI-2 Processes are compared fairly and accurately on their economic performance Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VI-3 Minor forecasting (e.g., breakeven prices, simple "what-if" scenarios) is reasonable/useful and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VI-4 Major forecasting (e.g., in-depth analyses, best/worst-case) shows foresight, insight and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VI-5 Team integrates outside information/methods (not presented in class), demonstrate creativity Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VII Appropriate, defensible, and accurate conclusions are explained well and completely Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    VIII Reference list is complete and properly formatted and cited correctly in report Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    IX-1 Accurate PFDs of 2 complete working models in Aspen or Excel (using only approved "cheats") Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-2 MEB closes overall and for each unit in 2 final models, reasonable numbers for all calculations Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-3 Appendix includes all necessary diagrams, stream tables, equipment tables; all are consistently formatted, follow conventions Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    IX-4 Equipment tables includes complete duty/sizing of all units for each process, materials, pressure, number (including backups) Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-5 Operating Cost calculations include material I/O, all consumables (e.g., catalyst), and all utilities and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-6 Capital pricing methods (e.g., direct quote or Cbm, Cp) are appropriate detailed in Appendix and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-7 Capital Cost calculations include table of all expenses for each process and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    V/IX Long term economics results (e.g., DCFROR, NPV calculations) correct, well-formatted and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-8 All sizing methods used are explained and are reasonable, justified and all performed and explained correctly Excellent 0 Good - some minor issues 0 Flawed - Major Issues 0 Extremely Poor - Multiple Major Issues 0 Not addressed / Not included 0
    IX-9 Ancillaries: Safety, Societal Analysis Appendix, etc. well formatted and clear Excellent 10 Good - some minor issues 8 Flawed - Major Issues 6 Extremely Poor - Multiple Major Issues 4 Not addressed / Not included 0
    IX-10 Societal Analysis addresses impact in ethical, environmental, and societal contexts; Safety addresses all major issues Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    ALL-3 In-text citation used everywhere appropriate, all literature resources cited directly Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    ALL-4 Easy to read, grammatically correct, uniform writing style, few errors (if any) Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    ALL-5 Figures & tables have proper captions and are easy to read, visually appealing, formatted properly Excellent 20 Good - some minor issues 16 Flawed - Major Issues 12 Extremely Poor - Multiple Major Issues 8 Not addressed / Not included 0
    James
    Community Champion
    Author

    @Prof_Barankin 

    You actually identified the problem in your comments. It will not accept two ratings within the same criterion that have the same point value. It's all those duplicate 0's within a row that caused it to laugh (internally, of course) at your rubric.

    I replaced all the 0's with points (in descending order) and then it imported just fine. So, it's not the special characters, it's just the duplicate point values within a criterion.

    mhower1
    Community Explorer

    @James 

    Just a quick kudos from the Air University/ASU Partnership.  We dove head-first into your rubric builder about three months ago, and it has changed our entire development process.  We've developed a workbook that fully integrates our requirements, courses, outcomes, and rubrics across 4 programs.

    Thanks again for this great piece of work.  I only hope that Instructure doesn't break it during the Canvas Rubrics redesign effort kicking off now (as our new rubrics are way too complicated to build by hand).

    If anybody is interested in seeing/obtaining a copy of our builder's workbook, PM me or drop a note below.

    v/r 
    MJH

    doug_cheney
    Community Explorer

    I changed line 706 in James' Rubric Importer script to be:

    return /^([0-9]+|[0-9]+[.][0-9]+|0?[.][0-9]+|-[0-9]+)$/.test(t);

    This expands the isPoints function to allow negative whole numbers.

    Now I am able to import this rubric with negative points:

    Timing On Time 0 Late < 24 hours -10 Late 1+ days -20
    Completion Complete 100 Almost Complete 90 Incomplete 70

     

    My testing verifies this rubric works as expected in Canvas.

    MichaelHower
    Community Member

    @doug_cheney,

    Thank you! Thank you! Thank you! My design group is in your debt.

    We've tested this thoroughly in Canvas with our "policy" deductions and it works just great.

    @James

    Is there any way we could get Doug's update added to the source Canvancement so that it updates automatically with all my folks?

    Thanks again!

    Mike H
    Strategic Advisor
    Air University/Arizona State University Partnership

    James
    Community Champion
    Author

    @MichaelHower 

    I haven't been following Canvas' treatment of negatives in rubrics. I know they're going through a redesign and may add more functionality. The way they enforced positives before was very hackish (initializing a value to -1 and then making sure values were bigger than that) so I would hope the redesign fixed that.

    I would need to verify that negatives are now supported and do some testing on my own. Can someone speed up that process by pointing me to the documentation that says negatives are now allowed but only if they're whole numbers?

    mhower1
    Community Explorer

    James,

    It looks like the recent rubric updates broke this tool.  The import button no longer appears.

    ...and my entire school's assessment process has ground to a halt.

    Any thoughts?

    Mike

     

     

    James
    Community Champion
    Author

    @mhower1 

    Thank you for letting me know the button no longer appears.

    A few things come to mind.

    It still works if you haven't enabled the rubrics redesign feature. I had to go into beta to see it since our institution hasn't enabled the rubric redesign yet.

    You can import rubrics through the API. When I wrote the original script, there was no API call for it, but Canvas has since added an API call. There might be a way to accomplish that 

    Since the new page is generated with ReactJS and doesn't have usable class names, it becomes a more challenging task to add the button. I'll have to use Mutation Observers to wait for the content to appear on the page and then add it. I'm not seeing an ideal place to put the button. I guess to the right of the create a rubric unless you can suggest something else.

    I'm sorry your entire school's assessment process with 110 courses and 30000 students has ground to a halt. I understand disruptions cause life to be stressful. I had a server crash in February that contained 30 years of my teaching material as well as all of my custom integrations with Canvas. The IT department was in the middle of switching backup providers and everything was lost. We were unable to get students into or out of their Canvas courses until I recreated the basic functionality. Even now, I'm still rewriting code. I'm the only Canvas developer at our school and I'm a full-time math professor so it's not a quick solution. Stressing me out is that classes start in 3.5 weeks and I need to rewrite some courses to not use the external tools that were lost.

    Kona just presented on this at InstructureCon and I will try to fix it when I can find the time.

    mhower1
    Community Explorer

    @James 

    Thanks for the update.  We just rolled the feature back on our instance and everybody is breathing again.

    When we discussed this with Instructure, they said a native import feature was coming "in a later release."  That would be nice to see...so long as we don't lose features.

    We love your tool here at ASU/Air University.  Coupled with a very robust Excel implementation, we were able to automate rubric development for 250+ requirements across our courses.  I really hope it will be possible to make it ReactJS compatible.

    In the meantime, we will start looking at an alternative API implementation....

    Thanks again for all you do.

    James
    Community Champion
    Author

    @mhower1 

    Long term, an API solution is better. At InstructureCon, I talked with Jeremy Perkins, who gave me the okay to sound the alarm about the deprecation of jQuery and jQuery UI in favor of making people install their own versions. Without jQuery UI, I don't have a way to make a dialog box pop up to paste content into. When that will happen, I'm not sure. They were talking about it in 2017, but it's gotten more push as they're using ReactJS and jQuery has had some security issues. I called it back then that they would eventually get rid of jQuery, even though they were saying they wouldn't. I asked Jeremy if he could wait until I retired before he made the change? I don't think that swayed him much, though.

    As a user-script, it wouldn't be that much harder to install jQuery, but for those who install it globally as part of the theme, I would have to check to make sure it existed -- or create my own dialog box. Things I have little desire to do right now.

    I've looked into the situation. For the new rubrics, it's still adding the button, but the right-side-wrapper is set to display="none", so it doesn't show up. The absolute quickest way to get the functionality back would be to force the display of that element. It would be one line of code and get the functionality back until I can create a more permanent solution.

    document.getElementById('right-side-wrapper').style.display = 'block';

    That line would be added in the add_button() function, say around line 196 but it may vary your your instance. It should be added somewhere after the check that makes sure #jj_rubric doesn't already exist.

    There are some cosmetic issues with this, so I'm not adding it to the GitHub code just yet. Namely, when you click on the Create Rubric button, it doesn't reload the page even though it changes the pathname in the URL. Once it adds /create to the end, it should not show the import button anymore. The page is still usable with it there, you just lose some width.

    If I can't get something figured out over the weekend, I may go ahead and implement that change and just warn people.

    As it is, I'm going to have to implement a mutation observer to see when the toolbar is created before I can add a button to it. That's the ReactJS madness Canvas does, but I've done it before. I cannot clone their existing button like I did with QuizWiz because the styling is all wrong and they didn't give it a human-understandable class to use.

    James
    Community Champion
    Author

    @mhower1 

    I've got a tentative solution that works with both the classic rubrics and the rubrics redesign page. It fixes the cosmetic issues and adds an "import rubric" button to the right of the "create rubric" button on the toolbar.

    Surprisingly, my mutation observer worked the first time. Getting the CSS selectors correct is always a challenge.

    I had last updated the code 7 years ago and there were 150 warnings about bad coding practices. I may try to fix some of that before I upload the code to GitHub. I need to test the code from the accounts page and make sure there are no unexpected surprises before I release it. I've switched to using the match directive in the code instead of include and want to make sure that doesn't cause any problems either.

    I do like that the new Rubric page tells you where the rubrics are used. I had written some code (I don't think I ever shared it) that pulled that information from the API, but this is easier to use.

    DrewClausing
    Community Member

    James, any idea why I can get this to run in Firefox but not Chrome?

    James
    Community Champion
    Author

    @DrewClausing 

    The most likely reason is that Google Chrome has started enforcing that you enable Developer Mode to run Tampermonkey. There is a reasonable chance that they may deprecate it completely as they don't want to allow code that allows you to download other code. The same thing goes for some of the adblockers.

    Go to the three vertical dots in Chrome at the top right next to your name. Select Extensions and Manage Extensions. At the top right is Developer Mode, which needs enabled.

    DrewClausing
    Community Member

    that worked, thanks James!

    TomDevitt
    Community Member

    @James This looks amazing but I can't get it to work in Chrome for some reason. My university's URL seems to follow the format allowed https://*.instructure.com/courses/*/rubrics and I enabled developer mode for all extensions. Any other suggestions? Thanks for your hard work.

    TomDevitt
    Community Member

    @James Nevermind! Restarting the browser after enabling developer mode seemed to solve the issue. Thanks again!

    CJChen
    Community Member

    2024 - Canvas got updated and this no longer works.

    the interface has changed 

    the below headings now go across the screen

    Rubric Name Total Points Criterion Location Used Actions

    Please help!

     

    James
    Community Champion
    Author

    @CJChen 

    This was discussed in the comments around July 25, 2024. For the time being, you will need to add the one line of code mentioned in my post or disable the rubric enhancements if you want to use the script to import from spreadsheets.

    At the time, the rubric enhancements were all or nothing, but they can now be enabled at the course level (provided your institution allows it) as opposed to the whole institution. You can do this by going to Course > Settings > Feature Options and turn off Enhanced Rubrics. That means you could temporarily disable the rubric enhancements, import the rubrics, and then turn back on the rubric enhancements.

     

    CJChen
    Community Member

    Thank you so much James- so for all who is looking for a quick fix:

    in your script, go to around line 196

    copy and paste this line of code underneath line 196

    document.getElementById('right-side-wrapper').style.display = 'block';

     

    >>>>>>>> paste under this 

    function add_button() {
    var parent = document.querySelector('aside#right-side');
    if (parent) {
    var el = parent.querySelector('#jj_rubric');
    if (!el) {
    el = document.createElement('a');
    el.classList.add('btn', 'button-sidebar-wide');
    el.id = 'jj_rubric';
    var icon = document.createElement('i');
    icon.classList.add('icon-import');
    el.appendChild(icon);
    var txt = document.createTextNode(' Import Rubric');
    el.appendChild(txt);
    el.addEventListener('click', openDialog);
    parent.appendChild(el);
    }
    }
    }
    document.getElementById('right-side-wrapper').style.display = 'block';

     

    Save script and the import rubric button appears again

    DrewClausing
    Community Member

    @James , I submitted this to canvas as a suggestion but it got me thinking, I wonder if someone like you were able to write a script to make this change possible... probably not, but here's a video of the change I'm requesting: https://trevecca.instructuremedia.com/embed/2338c02b-2dba-46c0-8be4-a805efa5e312

    Thanks again for your rubric tool.  FYI, I've used the enhanced rubrics and your tool is better IMO just because the spreadsheet yours requires is so much cleaner.

    James
    Community Champion
    Author

    @DrewClausing 

    So ....

    You must be using a modified version of my rubric importer. The version I have only does the title and not the description. It could be changed fairly trivially, and it looks like that's what you're using.

    I started rewriting the rubric importer when they said they were going to force us to the Enhanced (no sarcasm intended, okay, maybe a little) Rubrics. I decided that for now, you just don't turn on enhanced rubrics and then you can still use my script.

    As part of my rewrite -- which got stalled because of my regular job -- I modified the code to look for a title and comment in the same cell in the spreadsheet.

    Something like "Title||Description". That's two pipe (vertical line) symbols together. I figured that's unlikely to appear in an actual rubric, unless perhaps you were doing a programming rubric and your rubric description was to know how to use the || operator. Anyway, it would have been configurable so you could change it.

    Then it would go through and allow you to do both the title and description at the same time.  That's the best way I could figure out how to make it work and still allow for the flexible mode or the column mode. It still allows people to sort it by rows without having to worry about something messing up because it required two rows or two columns.

    Now, Canvas is planning on enforcing enhanced rubrics in SpeedGrader in January, even if faculty don't want them. I feel like I'm losing the battle and the rubric improvements I've made a lot of over the years are going to stop working and it's going to me make teaching a lot more time intensive. It doesn't matter if it's faster than it used to be for some people, it's slower than it used to be for me. That saddens me.

    Anyway, I managed to write the script but it turned into a major rewrite instead of just a patch job and I never got it finished. I'm maybe 75% of the way through making it work again, but right now it's not functional.

    It's possible the person who manipulated your script might be able to do something with that idea. I really don't know when I'll be able to get back to it -- probably not until next year (we're nearing finals) and then you have the problem of a new semester starting up. We're also in the middle of a major SIS migration that I haven't even started to look at yet.

    The forcing of people to use the new (is dehanced a word?) stuff may cause me to get around to it faster as I will want to use it for my teaching.

    As far as just making it so you can click and edit, that is not a trivial change. You could make the cells content-editable, but then you would need to keep track of which ones were actually edited. The better change, since you're using the rubric importer, would be to make it put the title and descriptions in at the same time.

    DrewClausing
    Community Member

    LOL: "dehanced"

    I'm actually using the mod you described on one of your threads regarding description titles.  I modded it myself on line 169 (I believe) by adding the prefix 'long' in front of description.

    Anyways, yes, I think your future script would work great for my purposes but a script to make cells content editable is not the ideal solution if you would have to keep track of the cells that have been edited (if I'm understanding correctly).  You would want it to work fluidly and dynamically as if it were a form or something.  But really, Canvas ought to make a solution for uploading rubrics as easy as your script makes it, PLUS, an edit feature as easy as I'm envisioning.  Because sometimes it would be convenient to just quickly edit a rubric without pulling up the old spreadsheet.  I don't see why they can't create both things simultaneously.