Panopto / Moodle-2.0-plugin-for-Panopto

Panopto's integration with the Moodle LMS.
http://www.panopto.com
GNU General Public License v3.0
18 stars 40 forks source link

Automatic course provision task #60

Closed Syxton closed 8 years ago

Syxton commented 8 years ago

Provisions new courses automatically. By default it will run 25 courses per minute. It checks against course id's that are already provisioned.

Syxton commented 8 years ago

This pull request creates a Panopto task to provision every course automatically in the background. By default it will run every minute, running through 25 per run.

Syxton commented 8 years ago

I added another commit to this push request. If does 2 things.

  1. Adds support for enrollment suspension and unsuspension.
  2. Fixes an issue where the unenrollment of a user in Moodle will ONLY work in Panopto if the user has "Viewer" rights in Panopto. Any other rights will result in nothing being done on the Panopto side. The problem is that Moodle does not supply enough information to determine what role or Panopto abilities the user had in the user unenroll event. By the time the Panopto code receives the event, the necessary data has been removed from the database. This could be fixed by Moodle adding the roleid information in the event object. The solution is to remove all roles of the user from Panopto when they are unenrolled from Moodle. The only hole this leaves is a Moodle user with multiple roles in a course. If one role was removed, both roles on Panopto would be removed. I believe this is not a common use case, compared to the current function which is that all Panopto rights are left intact on unenroll.

Please review and combine :)

plancaster-panopto commented 8 years ago

Hi @Syxton, Could you provide some context as to why you need this change? As we already have rolling enrollment syncing of courses as their rosters are updated, what does this cron task do that is lacking from the software as is? Thanks! Panopto

Syxton commented 8 years ago

Sure,

The cron itself is my way of getting around the need to have instructors manually add the block and provision a new course or for an admin to find courses out of a list of 5000+ courses to batch provision. We installed it, and after about 6 hours, all our courses were provisioned, and if a new course pops up, it get's provisioned automatically in the background.

The other bits of this push are to complete the areas of the rolling enrollment that were not working. Suspended / Reactivating enrollments and the fact that the unenrolling a user with permissions above "Viewer" will not be removed by rolling sync.

ericmerrill commented 8 years ago

This seems like it makes the possibly false assumption that you want all your courses provisioned in Panopto. We have something like 40k courses, and less than 1k that use panopto, so this would not be ideal for us.

Syxton commented 8 years ago

I totally understand, and you are correct, however we don't know which 25% of the courses are going to need provisioned, and our faculty complained about having to add a block to provision their course or email an admin to have it done for them. This solution, while not ideal, makes it happen automatically behind the scenes. And the only downfall is that we have to search for the folders because there are so many. But Panopto search makes that very easy.

Ideally, the first time a course tries to access the Panopto chooser, the course would be provisioned, however that isn't done currently. maybe I'll look into adding provision hooks into the text editor plugins.

ericmerrill commented 8 years ago

For us it's only ~1-2% of courses, so having all those extra folders in panopto is a pain, plus it means a lot of extra overhead when enrollments changes happen (since it would now need to sync with every enrollment change, not just the handful of courses that use Panopto).

IMO, something like this should be controlled by a setting (I know you can disable the task, but I think there should be an explicit setting on the config page for the behavior if it comes in).

hohno-panopto commented 8 years ago

It sounds like that this change does not satisfy all of Panopto customers. If we may get smaller chunk of pull request(s) that may be applied everyone, we'll review it again. Thanks!