So if you want to understand more about what it's doing, go read that. This is so much easier than the first blog that I'm almost tempted to pull the first one down, except some people have linked to it and it illustrates some of the technical details that this one omits. it downloads the libraries you include when you save the script so that loading them is almost instantaneous. It works with the Javascript already included on every Canvas page. But then it automatically runs, you don't need to do anything other than enable it. It allows for automatic injection of the JavaScript based on the URL, so it only loads on the Rubric page on your site. Since then, I've learned more and found a new technique that blows the first way out of the water. On August 16, I wrote a blog post illustrating how you could inject two lines of JavaScript into a page sort the criteria in a rubric: How to Reorder Rubric Criteria The techniques shown here open up a whole world of solutions to "I wish Canvas would. The ability to sort (drag and drop) rows of a rubric can be made transparent so that it automatically runs on the Rubric editing page. Please use the Quick Install and read the instructions and comments below if you care to know what it's doing or run into trouble. I didn't want to lose the blog post, because it explains what happens and has videos that show it in action, but most people want a plug-n-play, drag-n-drop, or click-n-go solution, and that's what you get through the quick install. This was one of my earliest attempts with user scripts and I've since learned how to make them really, really easy to install, but the documentation was in the comments to this blog post and people were missing it and still trying to follow the original instructions. The original blog post (below) talks about copying and pasting into GreaseMonkey. Also do not use the source code in the original blog post - it will no longer work. Tampermonkey is now the recommended userscript manager. Note that the blog post below refers to Greasemonkey. It was one of the early ones I wrote before I knew much about what I was doing. I took the time to update the script and improve the coding. However, all of the scripts now have async loading, which is a good thing, but it means that the script manager was injecting this script before jQuery was loaded and it failing. With the October 23, 2019, deployment, Canvas changed the way that jQuery is loaded so that it will be available for your custom global JavaScript and you won't have to worry about it. More information is available on my Sort a Rubric Canvancement page. Make sure a user script manager such as Tampermonkey is installed and enabled.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |