Canvas does a lot of things well. But every now and then I come across something that just seems like somebody skipped a ticket while they were coding.
One that hit me last week was the difficulty in moving a lot of question between banks.
Quick note… I found a quicker, easier, hackier way to do this. Leaving this here though since this is probably the more correct way to do it.
What I was trying to do is create a final review bank that was made up of all of the questions from the test and quiz banks that I’ve used through the year.
The first catch is that you can’t copy more than one question at a time. When you view a question bank there’s an option to move multiple questions. But if you want to copy you have to do it one at a time.
There’s a link under each question to copy.
If you click that it brings up the following modal.
Notice the “Keep a copy” checkbox. We’ll come back to that.
If you’re just copying one question it’s easy enough to use this dialog. Tell Canvas what bank to copy to, check the box, and click the blue Move/Copy button..
Copying Multiple Questions
My problem is that I have banks with dozens if not hundreds of questions. There’s no way I can go through and copy each question individually.
Turns out Canvas lets you import back into the same course. So my first step was to import all of the banks that I wanted to copy from into the course as duplicates.
Under settings you should have a link to import content into your course. Click that and you’ll go to a page where you want to select import from Canvas course. Select the same course you’re already in.
Canvas is helpful enough to put a little warning icon to tell you that this could cause duplication.
Be sure to select “Select specific content.” Otherwise you’ll wind up duplicating everything, and not just the question bank.
Click the blue Import button and the import will show up in a list underneath. You want to click on the blue Select Content button to finish.
Clicking that button will bring up a modal where you’ll select the content to duplicate. I duplicated about a dozen banks, although the screen shot only shows one.
Then click on the import button. The modal will close and your import will start. Wait for it to finish. I’ve had issues where imports didn’t finish if I left that page.
Copying the Questions
Now let’s head back to the question bank page. You should see two copies of any banks that you imported. At least, that’s what I saw when I did this in my school Canvas account. For some reason it didn’t work on my local development copy of Canvas. But it should work for you.
Click on the duplicate bank. It’ll have the same name, but should be dated right now.
Then click on the move multiple questions button on the right side. That’ll pop up this modal.
Notice what’s missing? There’s no “Keep Copy” checkbox. If there was, all of the mess of importing a bank back into the same course would have been unnecessary. That’s why we had to make a duplicate bank. Now we can move all of the questions, emptying out the duplicate bank, and then delete it.
One more snag though. There’s no select all for the checkboxes. This bank only has 3 questions because it’s an example. But I have banks with hundreds of questions. No way I’m spending that time scrolling and clicking.
With the above modal on your screen press F11 and the browser console should pop up. It’s a sub window that tells you about what the browser is doing. You want to click on the Console tab if it’s not already the one that comes up.
In the console you’re going to type a bit of code. Under whatever the last line is in the console click and you should be able to type. Enter the following.
jQuery('li.list_question input').prop('checked', true);
What this will do is check all of the boxes next to the questions so you don’t have to.
Now just pick your bank and click Move Questions. When you’re done delete the duplicate bank. It should show as having 0 questions in it.