[Modules] Publish / Unpublish ALL Option

This idea has been developed and deployed to Canvas

Instead of having to click every single item in a long list to Publish or Unpublish them all, it would save a lot of time if we had the option to "Publish All" or "Unpublish All". It would be even slicker if we could select or highlight a large group of multiple items (though not necessarily all of them) to publish or unpublish all at once.

Added to Theme

121 Comments
mcosio
Community Novice

Is there a way to batch unpublish a large number of courses? It is tedious to go page by page and unpublish courses that are not ready for prime time. I appreciate your suggestions.

patrick_bailey
Community Novice

Why not make an option to Unpublish All when importing content from one Canvas course to another?  Wouldn't it be just as simple as making a single, toggle-box selection the same way you can opt to remove all dates from a course before it's imported?

alan_grenadir
Community Novice

Why not make a radio-button option under 'Settings' for a course to exclude 'Restricted Access' as an option for 'Editing Permissions' for files. If selected, then the Publish/Unpublish icon for each file in Files would be a simple toggle, and clicking the icon would change the editing permission for that file without opening a dialog box. That would be a partial solution. The only exceptional case to handle would be if some files were already assigned 'Restricted Access'.

cgabrielson
Community Explorer

This would be a novel UX idea too. From my perspective, things that are a UX fail should be high on the priority list and not considered "feature requests".

monsonmj
Community Novice

Oh, the insanity.  I want the students to see the modules, but only reveal the content within as progress through the course.  If I publish a module, all content within is published, and I have to reset each one.  Yet, if I publish an item within a module, it is not visible until I publish the module.  

augustone1998
Community Member

It has been years....this needs to get done. Here I am at the start of another year and I need to click each document THREE times! What a waste of my time. How many clicks and how much time will teachers waste on their canvas pages before school starts... Talk about an easy fix. I am no programmer, but I would imagine this might take a week to resolve. Not sure why our system ever got rid of Moodle. Click and drop files. Easy in and out. As you can tell, I am frustrated. Union County needs to go to Google Docs like CMS. 

sbitner
Community Novice

I am not responsible for anything that breaks as a result of running this, but it works well for me. It programmatically clicks all of the published items. I tested it on the modules page but I suppose it should work on the files page too.

  1. Open the page in the Chrome web browser.
  2. Open developer tools. If this isn't something you've done before, it can be done by right-clicking then selecting "inspect".
  3. Click "Console" at the top of the developer tools window that opens.
  4. Paste the line at the bottom of this post and press enter. This selects all of the published items and simulates a click on each one in turn.
  5. Click the x in the top right corner of developer tools window to close it and go about your business.

$('.publish-icon-published').click()

david_eargle
Community Explorer

Verified worked, high five for javascript!

fisher1
Community Contributor

 @sbitner ‌, 

Thank you for this little gem.

Do you know how to publish only the module and not the module items with JavaScript? Currently, the default behavior for publishing a module is to publish all items in that module. I am looking for a way to publish the module only and not have everything within that module published.

david_eargle
Community Explorer

You could take the approach of first publishing everything, followed by unpublishing everything that is not a module. e.g., 

# publish most-all unpublished things (won't get files) 

$('.publish-icon-publish').click() 

# click "unpublish" for all non-module publish buttons, using the :not() selector

$('.publish-icon-published:not([data-module-type="module"])').click()