Hi Canvas gurus,
I've got a bit of a dreamscape project that I'm looking to build and am wondering if anyone has done anything similar or is able to help me think through how to best develop it. What I'm wanting to build is a webpage on our university's site that would allow a faculty member to create a sandbox course on their own as opposed to emailing our team to do it for them.
The simplest way to achieve this would be to enable faculty to create courses within Canvas, however, I'd like to make a more controlled process that automatically adds the course to the correct subaccount, and also has a prefix appended to the reference ID.
So here's the ideal solution: a webpage where a faculty member signs in, they click a "Create Sandbox Course" button that asks what they'd like the name of the course to be, and then that course gets created and with them enrolled as the instructor. Any ideas of how to achieve this or is this too simplistic in the reality of what needs to happen?
I appreciate any and all recommendations.
Solved! Go to Solution.
I don't know what the API's threshold for harassment is but...
I think I wrote most of the sub account tray menu against production, simply because it was faster. :smileyblush:
Tolerance must be high.
Are you working on production, test or beta?
What roles do you get from?
What roles do you have set on line 50?
// the roles allowed to create a workroom
How are you disabling course creation?
If you can share your source somewhere, I'll see I get the same error.
So those users don't have the + Course button anywhere because a permission removes it?
I'm looking for that permission but I don't see it. What's it called?
I'm pretty sure we don't disable any permissions for creating courses, we adjusted the UI to hide the button, and using this script define HOW they create a course.
Thanks @MattHanes !
Definitely looking in the wrong place (and honestly, still brushing up on just how Aaron set this up)
@michael_mcgarry , here's what we have set... should fix those errors.
You'll need to apply that snippet to remove the +Course button, between line 35-41 of the gist.
Now, this may fall back to the Implementation & Deployment part of the readme. All staff in our district have the teacher role because we auto generate their first Workroom and their teacher enrollment for the workroom via SIS Import. If you have staff who don't have teacher enrollment yet, they will probably still get a permissions error.
Thanks carroll-ccsd, that seems to have done it! Except now I'm getting the error as an admin...but I'm thinking this is more a timeout issue. For my own testing purposes (excuse the super n00b question here), what would be the correct syntax so that both the 'teacher' role and the 'admin' role were permitted in line 50?
Everybody was a noob sometime, some days I'm not sure I'm any further along. :smileygrin:
If you to paste your code somewhere like JSFiddle , I'll try it out on test and see if I can spot anything. Remember, I'm kinda working through this too because a previous employee wrote and implemented it, so I could be missing steps. Positive that the entire setup happens within Canvas and the UI, so nothing too technical. Just have to work our way through it.
Hmmm...I had tried that too. The weird thing is it's almost like adding those roles bricks the entire thing as I no longer see the + Workroom button when I upload that version.
I went ahead and created a Fiddle for you take a look at. Thanks for taking the time to work this out with me! It's much appreciated. This has been a little pet project for me that I've been wanting to get done for a while, so you're helping me and our campus out a ton with this.
Try removing the comma on line 70 :smileygrin:
year: '2-digit', // this comma, this must go
Doing so, gave me the button when I pasted it into the console. I used my own term and sub account, and got this...