Closed sharpchi closed 7 years ago
Hi,
We only support installing this specific update through the Moodle UI as user context is required.
That makes for a non-standard upgrade process where everything else, including core Moodle is upgradeable via the CLI.
In fact Moodle's upgrade script instantiates an admin user to apply default settings, so it strikes me that this same method could be used for your bit that requires a user context.
From admin/cli/upgrade.php lin 184
// log in as admin - we need doanything permission when applying defaults
\core\session\manager::set_user(get_admin());
Since only those with direct access to the server can run CLI scripts, I don't see any reason not to do this.
Hi Mark, The user context is needed because the user applying the upgrade needs to have permissions on all Panopto folders to perform the upgrade (the upgrade is altering Panopto folder permissions to use the new API).
If you could find the username name of the admin user and temporarily make that user an admin on your Panopto server the upgrade should proceed through the CLI (get admin user name, make account on Panopto server with name <instanceName>\<userName>
, give that account temp administrator role during the upgrade).
If you need further assistance with this issue please open a Panopto support ticket so we can assist you more directly.
Thanks, Joe M
Hi,
We are releasing a new version of the block soon that should have the tools needed to allow for a CLI upgrade. I remembered this ticket and thought I would let you know to keep an eye out in the upcoming week for this release.
It generally is the above workaround, but we now display the name of the user attempting the upgrade so you know who to temporarily give them admin privileges on Panopto and try again.
Thanks, Joe M
Unable to upgrade the plugin (v 2017061000) via CLI. Results in:
This is problematic for us, as this is our usual method of updating Moodle, in order to avoid timeout issues.