Closed shafferp closed 2 years ago
That is a interesting problem I had not anticipated. It will require a little doing to unwind in all the script post/download functionality to allow for the variable on setup.
As you’ve discovered, the URL is hard-coded for umn and the initial script only asks for a course id. So, I need a broader understanding of the URL structure. I presume that the pattern is [xxx].instructure.com where xxx is the school designation. However, I can envision a variety of alternatives that would require getting creative. If you let me know the URL you use to access Canvas, that will give me a little insight.
Sean
Sean Conner, Ph.D. | Department of Genetics, Cell Biology, & Development University of Minnesota | Office: 4-116 MCB Building | 612-625-3707 Mail: 6-160 Jackson Hall, 321 Church St. SE, Minneapolis, MN 55455
On November 1, 2022 at 7:21:44 PM, shafferp @.***) wrote:
This is exactly what I have been looking for and am eager to test. It may be obvious how to do this, but I would like to try this at my university and I don't see how to change it so it doesn't default to Canvas at unm.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Did some digging. It appears Instructure has over 6000 subdomains.
What I 'think' I know .... read presume .... each institute is provided an Instructure subdomain (
The subdomain is essential for pointing the app to the correct instance. Including this variable wasn't on my map because I didn't envision anyone beyond a few local colleagues using the app.
I have scrapped the subdomains (all 6,146) and can integrate, but I'm not sure if some institutes manage their Canvas instance in another manner. I also have no idea if this list is accurate (meaning complete or current).
I am happy to make a few pilot modification to the app and post an update if someone is willing to test.
Thanks for the quick response. For our institute, we use:
https://canvas.uw.edu/courses/
I'd be happy to test if you can manage to make it work here. We have a committee that has been exploring how to make a database of quizzes for our introductory sequence. The university doesn't have a license for FileMaker, but our group does and has been using it for years.
Again, I appreciate your getting back to me. I hope this is something that can be made to work without too much effort on your part.
A pilot test shouldn't be hard. I'm trying to better understand how Canvas is put together. There appears to be the local access point (http://canvas.
Super. I may not have a chance to look it over until tonight or tomorrow morning.
Update posted, now 1.0b given this will be the first use outside my university. I have made a few minor scripting changes that should get things started. The changes will likely break some features. I will investigate as they are identified. You will notice a subdomain drop down list on the setup page. I think yours should be 'uw'. This is a list of currently known subdomains on instructure.com. Test it. 'umn' works for me and I had no issue posting a pilot quiz. I'm not sure how to let people know which to choose if it isn't obvious. I need to get some feedback and mull it over.
Also, I enabled the URL view when a script initiates a connection so you can see the actual URL connection attempt. If you notice a URL pattern that makes no sense, let me know. This is for trouble-shooting and I will likely disable it in the future. Any feedback is appreciated.
I found some time today to test it. Some very nice features. I am impressed.
I'll try to download from Canvas some of the quizzes I have and see how that works tonight. The program looks like it could be very useful for some of us. Thanks for your help. I hope it isn't taking up too much of your time.
I’m currently trouble-shooting. I haven’t touched this stuff in a while (beyond using it myself) and am trying to figure out what I did and how I solved some scripting challenges. I appreciate the feedback because the only thing I could ever test was umn stuff. From below
If interested, the figures will be posted to a ‘figures’ directory in Canvas ‘files’, not to the uploaded images directory.. The blank spot in your question derives from the fact that the embedded html link cannot find the file that should be in the ‘figures’ folder. It shouldn’t take long to fix and I’ll post an update.
Keep the feedback coming. Cheers
On November 2, 2022 at 3:53:20 PM, shafferp @.***) wrote:
I found some time today to test it. Some very nice features. I am impressed.
Yes, I needed to put uw for the infrastructure domain The Open database and import questions works (selecting "example questions" works fine). However, when it asks for the figures, I select the "figures" folder and get "Authentication failed". I then get a message "All done" and the figures appear to be in the database -- and the questions are bolded in the list -- but they don't show up when I upload to Canvas -- see 4 below). I can create a quiz after selecting questions and I can then upload it to Canvas. The export progress looks good and I get the Upload Complete message. Then clicking to view the quiz in Canvas also works fine. (Showing the urls really helped me troubleshoot what to put on the startup screen.) The figures don't seem to show up in Canvas. There is space in the question for the ones that are part of the questions in your example questions folder but the figure is blank. Also, I tried adding a figure to another question and it doesn't look like the figure has been exported from Filemaker to Canvas. They don't seem to be in any of the course images. I'll try to download from Canvas some of the quizzes I have and see how that works tonight. The program looks like it could be very useful for some of us. Thanks for your help. I hope it isn't taking up too much of your time.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.
1.1b update posted to fix figure upload problem
Thanks for the update. I'm working through it now. Some feedback on #2 above with a video showing the error:
Also, when going to quizzes from questions I get the same error.
Thanks for movie. It is a Filemaker error, likely resulting from a script step trying to access one of the tagging databases that are locked from view so as not to confuse users. I’ve never seen this on my end, even without admin authentication. I will try investigate later today.
On November 3, 2022 at 8:02:05 AM, shafferp @.***) wrote:
Thanks for the update. I'm working through it now. Some feedback on #2 above:
I still have trouble with the import of the example questions. It works fine, but I get the "Authentication Failed" error" when I try to import the figures. However, the figures appear to be imported since they show in the questions in the database. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.
I think I've tracked down the source of the error. Please try v1.1.1b update for attempted fix.
Yes! Quizzes and figures import. I can also import a quiz into Canvas (although the figures still don't show, which I think you are still working on). Now a new issue. When I try to go to use the "Canvas links" (the globe icon) the url is truncated and so won't work. For example, I'm now getting:
/courses/1408838/quizzes/1760815/take?preview=1.
I showed the database to one of my colleagues and we may test it in tandem.
URL issue: this means that the script isn’t pulling the ‘Canvas access point URL’ data entered in the setup. The script directly places the Canvas URL in front of the truncated URL specified. Very simple script two step script. Can you verify the URL (https://canvas.xxx.edu) is present? What is the exact format you entered?
Figure import issue: I missed this as an issue. Are the figures present in the QTI package you downloaded?
Can you provide a zipped copy of the quiz (or example) for me to test?
On November 3, 2022 at 1:05:44 PM, shafferp @.***) wrote:
Yes! Quizzes and figures import. I can also import a quiz into Canvas (although the figures still don't show, which I think you are still working on). Now a new issue. When I try to go to use the "Canvas links" (the globe icon) the url is truncated and so won't work. For example, I'm now getting:
/courses/1408838/quizzes/1760815/take?preview=1.
I showed the database to one of my colleagues and we may test it in tandem.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.
URL issue: Your suspicion was correct, I had forgotten to put in the url (https://canvas.uw.edu). When I do that, all is good regarding the links in the globe icon. However, I think it keeps that information - even though it doesn't show in the "Enter your Canvas access point URL".
Here is what I can do:
That will upload the quiz to my canvas course. However, when I click on the Globe icon, it doesn't have the "https://canvas.uw.edu" in the url field.
Figure import issue: You are right, the figures are not in the QTI package that I download from Canvas. That may be due to the way we (as a Department) have been storing the figures. I will test that with several other quizzes and let you know. But that is probably on our end or with a switch in canvas that I need to find.
Figure export issue: I am still having the problem that the quizzes I export to Canvas have blank figures where the image should go. I've attached a figure that shows what I see in canvas for a question that should have a figure. There is a figure box in the question, but it is blank. I also can't find the figure in canvas (in my User Files or Course Files. Am I looking in the wrong place?
Thanks for the prompt responses.
URL issue: Your suspicion was correct, I had forgotten to put in the url (https://canvas.uw.edu). When I do that, all is good regarding the links in the globe icon. However, I think it keeps that information - even though it doesn't show in the "Enter your Canvas access point URL".
If it doesn't show in the "Enter your Canvas access point URL", it is not stored in the database. This may be the area of confusion.
http://canvas.
http://canvas.
Access to the portal requires an accurate http://canvas.
Unfortunately, I am not privy to how each institute sets up a local Canvas installation. That said, if
Figure import issue: You are right, the figures are not in the QTI package that I download from Canvas. That may be due to the way we (as a Department) have been storing the figures. I will test that with several other quizzes and let you know. But that is probably on our end or with a switch in canvas that I need to find.
I note this somewhere in the documentation and it comes up when multiple instructors teach a course and host figures in their directories and not a general course directory. This is an issue with Canvas where I suspect that 'download quiz' does not capture the figures because the person logged in does not have permissions to another instructors files. I know of no automated solution to this except either move the figures to a directory that allows download or enter figures by hand into Any Questions.
Figure export issue: I am still having the problem that the quizzes I export to Canvas have blank figures where the image should go. I've attached a figure that shows what I see in canvas for a question that should have a figure. There is a figure box in the question, but it is blank. I also can't find the figure in canvas (in my User Files or Course Files. Am I looking in the wrong place?
This suggests to me that the figures are not being uploaded to Canvas at all. Go to 'Files' under Canvas. There should be a subdirectory called 'figures' that contains the file you intended to upload. Is it present?
If it is, no URL problem for the database. However, the figure name might be fig_? with zero data. If that is the case, it is a file encoding problem during upload. Can you let me know the file name/type?
If there is no 'figures' folder or file, this is an upload URL problem where I must have missed the subdomain $variable that started this process off in the first place. There are lots of scripts to edit😉
Let me know
Thanks. I have a better understanding now.
URL issue: I think I understand. Interesting how that works, but it makes sense. I just need to remember to put that info into the database when I start up.
Figure import issue: I had started to suspect this and when I got your reply was experimenting with different ways to embed the images into a canvas quiz. I think I see how it needs to be done (although unfortunately, it is not how we have done it in the past).
-->One question: For some of our work we have embeded figures into a Canvas quiz by using a url that links to a site outside of canvas. For example: "<" img style="height: 322px; width: 650px;" src="https://depts.washington.edu/uw121f01/WEBQ3/CNP_v010abc-f02.jpg" alt="" />"
It looks to me like you ignore embedded html in the question text. Would that be something that could easily be over-ridden? (perhaps a switch to allow the questions that are imported from the QTI file to keep some or all of the html?). [I hate to ask, since I know the amount of time it can take to implement something like that and it would be a special use case just for us. It may also break something else in Canvas. I might also be able to pre-process the QTI file in some way to accommodate that issue.]
Figure export issue: I went to the Files section of Canvas and do see a folder called “figures”. In that folder is a file called “fig.?”. The size is, in fact 0. When I download the file, it is named “fig.png”, and empty.
I deleted the file in Canvas and uploaded a new quiz with two figures. There is not a single file in the Files>figures folder in canvas with the name “fig_.?” in it. Let me know if you need more information or trouble-shooting.
There is no need to put the information into the app on each startup, presuming you are not constantly erasing the database. If entered, the information is stored. Just enter it once.
Once the upload issue is resolved, there is absolutely no need to store figures anywhere else outside 'Any Questions'. The app uploads the figure to the 'figures' directory. The quizzes are then constructed in a QTI format that Canvas decodes. It took me months to reverse engineer the QTI format Canvas uses. It is not the actual QTI spec, unfortunately.
If a question has a figure, html code is embedded in the question that points to the file that was previously uploaded into the 'figures' directory. There is no need to import a figure or do anything else with the question. Without going into the exhaustive backend details, 'Any Questions' needs to know the file location that Canvas reports back after the upload (see below). The app then uses that information to encode the hmtl. If the upload fails, there is no information embedded, thus you're seeing broken html in the question. My goal was always one-click post for an entire quiz and not have to do anything else.
I assume you mean when the QTI quiz is imported into the app? The answer is yes, I strip all html by necessity. I could not figure out how to parse all the appropriate data for each question type (like answer options, multiple choice variables, etc) when the html is present. I could easily disable it, but you would not like the outcome. Take a look at the actual xml file data for a quiz and you might appreciate the parsing challenge.
This would be a pretty big undertaking and yes, it would break every question format script (more than a dozen). If you send me an example QTI, I'm happy to take a look, but no promises. I realize this limits the ease of automatic figure import, but I'm not sure I have an obvious solution. As an aside, I used to store figures on a remote server and embed the appropriate HTML code years ago. I gave up on this strategy because I ran into server certificate problems. Canvas requires HTTPS. The university servers eliminated our storage and it all fell apart. Long term, this is also a bad idea because one must keep track of figures independent of the associated question. The app completely circumvents this problem. The figure is directly associated with the question. Any quizzes posted to Canvas are disposable by nature and can be recreated in seconds. The database is portable and not tied to any platform. If the desire is to limit data stored on Canvas, I completely get that too., but that is a different issue.
What version of the app did you use? Could you try the most recent and report back. I have made a single change to trouble shoot. When you upload a quiz with a figure, the script will pop up a window titled 'response' midstream somewhere (see example image). Note that is is not a simple '/file_directory/image_name' URL. This is how Canvas actually stores the URL on the backend. I think everything else one sees on the user end is an alias, but I cannot be absolutely sure of it.
It should contain a URL if all is ok. If it is empty, that means the script isn't getting a response from Canvas with the actual file location. It is a script problem related to attempts at globalization. I actively use the most recent version of the app daily. So, I know things are working in my environment. The current challenge is ensuring that the app is globalized. If you see a URL and it still doesn't work properly, let me know what type of figure file format you are trying to post (jpeg, png, etc), as this might provide a clue.
Finally, I want to close this thread as it has turned into a trouble shooting thread for issues way outside the scope of the original problem — it makes things hard to track what is fixed and what remains unresolved. I remain committed to my original goal of making the app useful for others beyond me, so I appreciate your feedback.
I just put your figure into my database to post on Canvas. This is what I see in the html. I didn't specify a dimension in the database, so that information isn't present. I could have, but forgot.
This is the actual post.
So there isn't a problem with the figure file. If the recent app update doesn't work for you and you don't get a URL, it is a script problem where I missed changing a variable for globalization and I will go digging.
I used the latest version - v1.1.2b. I've attached a figure of what I see when I get the Response dialog (it is blank). I also am attaching a figure showing the html in Canvas for one of the Example questions when I uploaded them to Canvas. (It hadn't occurred to me to do that before.) It looks like there is no src.
Thanks again for your efforts.
try the update. it won't fix it, but please screen shot the first response. It will help in determining which step in the script is chocking. It should look like this:
You will get a two windows for each figure. Just click 'command period' to stop the script after.
Forgot to mention, update v1.2.1b.
I think I found the problem, but it will have to wait until tomorrow. There is a substitute step in the script that says 'canvas.umn.edu', which obviously isn't a variable and won't work for you. I will post an update tomorrow.
v1.1.3b update posted
Can you verify that the URL structures entered are correct? URL pattern: http://canvas.xxx.edu (no quotes, no end slash or additional directory)
FYI ... beyond the initial setup, the URL, subdomain, etc can be setup on the 'Quiz' layout by clicking the gear on the top bar.
I think I tracked down the problem. Can you try to upload the example quiz and let me know how it goes.
I enabled two dialog windows to trouble shoot. Two responses should be returned for each figure posted.
First response should be an 'Upload Token' Second response should be 'Post URL'
As long as you see something, everything is likely functioning correctly with the exception of a response that says 'fig_? empty' or something like that in the 'Post URL' dialog.
I have confirmed everything works on my end, I'm hopeful this solves the upload issue. Be aware that I have not touched any other scripts like those under the 'Delete' menu. They are not globalized yet.
I just tested uploading the example questions. They worked! Thanks. The figures appear to be in the figures folder in Canvas Files. FYI, I got the two dialog windows, each one for each figure.
The url structures are correct. It is good to know I can get to them through the gear icon. I had seen that early on and then forgotten. I assume that means I can change them there if I want to upload a quiz to a different canvas course. That is great. [Note, I do notice that if I click on the dropdown menu next to the subdomain or the Canvas ID I get a list of what I assume are your fall classes (Fall 2022 GCD3033 with a canvas ID and Fall 2022 GCD151 also with a canvas id. I get the same list whether I click on the subdomain dropdown or the Canvas ID dropdown.]
At this point, I've only used the Wipe Database script in the menu. I haven't tried any of the others.
I did notice that the order of the questions that were uploaded to canvas is different from the order that shows in the database. Is there a way to ensure the order is the same as is set in the database or does one just need to re-order them in Canvas?
Thanks for all your work on this. I know it must take a lot of time, but the database is now in a position that I'll have a few graduate students test it out.
Great,I will diable the dialogs on next update.
Yes, this is an editable menu and value list. Structure it as you'd like. However, your actual selection has to be a course id number for the scripts to work. Just select the course id and the app posts the quiz toward the indicated course. The token is universal for your Canvas account, not individual courses. As such, only 1 token is needed.
This is a mistake I made last night. I generate an app build with a single script which does the heavy lifting for me to generate an empty database to post. I do this from my active dataabase. I made changes last night and need to include a step that wipes that information. The options shown are a value list and I need to figure out how to clear it via script. It is really handy when dealing with multiple classes.
However, now that you have my course ids, can you please post exams for both courses. One is on Tue (Cancer Biology) and another is on Th (Cell Biology). Please ensure it is a mix of question types where each topic has an equal distribution of points;)
This will be corrected on next update.
I will work on other scripts when I get some time. They need to have the same $variable setup as the post scripts. I would be surprised if they work for you.
The order of questions you see under the 'questions' layout defaults to the order they exist in the database or the order that results from a query. However, the order posted on the quiz is the order you should see in the 'quiz' layout. Note there is a 'sort' button (above the questions) on the 'quiz' layout that, once selected, allows one of reorder questions via drag drop. I wish the implemented solution were smoother, but it was the best I could do.
As you reorder questions in the 'quiz' layout, you will notice the number change. If you return to the 'quiz' layout, the order should persist. However, the leading number in the 'question' layout is the chapter that is associated with it (see Auxilary Question Data button). If you have not associated a chapter, there will be no number. This is just a convenience I set up for myself and is easily modified.
I will close this issue. Feel free to open up new issues as discovered.
This is exactly what I have been looking for and am eager to test. It may be obvious how to do this, but I would like to try this at my university and I don't see how to change it so it doesn't default to Canvas at unm.