cancel
Showing results for 
Search instead for 
Did you mean: 

Publish / Unpublish ALL Option

Publish / Unpublish ALL Option

(14)
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.
80 Comments
augustone1998
Community Member

How do you do this exactly? When I unpublish a module, and mess with each item, it still publishes everything. 

augustone1998
Community Member

I want to thank Canvas for my 300 clicks this morning and 15 minutes wasted!!!!!! Happy school year.

fisher1
Community Contributor

 @david_eargle ‌,

Thanks for the great workaround!

I've combined your solution with a delay of 5 seconds between each command:

$('.publish-icon-publish').click();
window.setTimeout(
function() {
$('.publish-icon-published:not([data-module-type="module"])').click();//happens 5 secs later
},
5000
);

The only bummer is that all the notifications for "Content" being published still come through...the perfect solution would be to find a way to stop the Module publish button from publishing all the Module items.

kmeeusen
Community Coach
Community Coach

Funny, but true,  @fisher1  - When Canvas first came out, when you published a module it did not publish the content in the module. Community users requested a change in that behavior - lots of them - and Canvas made it so. Now, just a few years later, many users are asking to go back to the original functionality.

I suspect what is needed is a pop-up checkbox when publishing a module that lets the user choose between those two options.

Kelley

olsonhum
Community Participant

This just happened to me too. I unpublished every element in a module. Then, I was playing around with publishing/unpublishing the module overall, and when I "re-published" the module, every element I had *tediously* unpublished within that module was again published. It amazes me that 1) this "error" (which is what I consider it) occurs, and 2) that Canvas, as widely used as it is, does not have a way to batch publish/unpublish items. I find a lot of features of this LMS disappointing (our school is currently converting from D2L and I personally do not see the advantage of Canvas - it creates numerous headaches that D2L never had).

olsonhum
Community Participant

This is EXACTLY the reason I want this too! I'm not going to reinvent the wheel each semester, but having to manually unpublish everything is pretty close...

olsonhum
Community Participant

This seems like a very basic ask for such a widely-used LMS platform. It surprises me that it wasn't in place the day Canvas debuted.

olsonhum
Community Participant

Totally agree. It's unacceptable, really. I don't know how much my institution pays for this software, but I'm quickly beginning to think it's too much.

hasti
Community Champion

Sounds like Canvas was a lot more responsive to user requests for changes when it had a small more homogenous user base. Maybe now that they've grown they could start to be responsive to their new larger user base, including those of us with huge classes and large Canvas sites.

I would love anything that would give me some control over this!

lukamtow
Community Member

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

And


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

Are godsent but doesn't seem to work with files. I've been relying on Python Selenium automators to unpublish 320 files manually in the modules page. If anyone has a better idea I'm all ears.

david_eargle
Community Member

Unpublishes all files. Waits 1 second after opening the model before selecting the "unpublish" radio button, and then submits the modal. Then, proceeds to the next attachment. Had to make it recursive because otherwise loop functions would try to pop open all modals at once, which wouldn't be pretty.

We should make a power-to-the-people browser extension or something

var attachments = $('[data-module-type=attachment] button').toArray()

var unpublishAttachment = function(e){
   
    new Promise(function(resolve, reject){
        $(e).click()
        setTimeout(function(){
            resolve();
        }, 1000)
    })
    .then( function(){
        return new Promise(function(resolve, reject){
            $('.permissions-dialog-form .icon-unpublish').siblings('input').click()
            $('.permissions-dialog-form button[type=submit]').click();
            setTimeout(function(){
                resolve();
            }, 1000)
        })
    }).then(function(){
        if (attachments.length > 0){
            unpublishAttachment(attachments.pop())
        }
    })
}

if (attachments.length > 0){
    unpublishAttachment(attachments.pop())
}
lukamtow
Community Member

Dave, you are amazing! I'm testing if it's possible to add a separate line to check if it is already published (perhaps checking if icon is published or unpublished) so it doesn't have to click on every single file whether they're already unpublished or not.

And yeah, we totally should release that extension. Canvas is just missing too many features.

david_eargle
Community Member

You could just change the first line to be more picky, by filtering to only include buttons with 'published' css class:

var attachments = $('[data-module-type=attachment] button.published').toArray()
augustone1998
Community Member

As a 6th grade math teacher, I do not know any computer code and I am unwilling to even try it. Canvas needs to figure this out. If lay-people can do it, so can they.

Again, big thanks to Canvas for all the clicking I had to do at the beginning of the term . SO DUMB.

John Myers

6th Math Teacher, M.Ed.

Marvin Ridge Middle School

2831 Crane Road

Waxhaw, NC 28173

(704) 290-1510 (phone)

(704) 243-0153 (fax)

Note: All email correspondence to and from this address is subject to public review under the NC Public Records Law.

As a result all messages may be monitored by and disclosed to third parties.

david_eargle
Community Member

 @sbitner ‌ describes how to run these scripts in this comment: https://community.canvaslms.com/ideas/6173-publish-unpublish-all-option?commentID=150746#comment-147... 

It's javascript that you run in your browser. In theory, yes, javascript can compromise accounts etc, and not everyone is a security expert to be able to discern what bad things my / the code might do, but perhaps you can trust others to review and vouch for the code. The javascript is merely selecting elements on the website (that's the `$('some selector')` part), and then simulating "clicks" on elements (`.click()`), just as if you had done it with your mouse.

Yes, Canvas should implement this functionality, but I've had them take three months to fix a show-stopping bug in quiz.next, so don't hold your breath for new features anytime soon

ronmarx
Community Contributor

Your comment,  @david_eargle ‌'s replies, and the sentiments expressed by  @olsonhum ,  @hasti , and  @lukamtow  are perfect examples of the additional needed work Instructure needs to do on its Canvas LMS product. There are just too many code solutions to the myriad of perfectly legitimate requests for features and functions, but the Canvas product directors don't/can't/won't prioritize implementing them in the product.

My comments aren't intended as a shallow critique, or digs against the many diligent, committed Instructure personnel. Instead, maybe idea threads like this should be used to resurrect the Khaki conference program with NEW participants, hosted by Instructure, with travel subsidized by Instructure. (Now that my contract with my previous employer has ended, I'm at liberty to submit my resume at Instructure's request.)

jennifer_lawson
Community Member

This would be a huge help...thank you very much!!!

augustone1998
Community Member

So glad this popped up on my email again...I want to officially thank Canvas for not fixing this. The start of another term bring about 1000 more clicks of a mouse and 10 minutes of my time. GET THIS DONE ALREADY. 

jennifer_lawson
Community Member

I hear you!!!

barbara_popp
Community Member

It would be beneficial if this could be an option for when we sandbox our courses to work on in the summer.  Without an, "all unpublish" button would prevent them all for showing up in our gradebook upon the start of the new year.