Commit 0dbafbe0 authored by Lisa Seeto's avatar Lisa Seeto Committed by Gerrit Code Review
Browse files

Merge "Bug 1928506: Archive on release for page"

parents aaea515b 953cdd48
......@@ -1919,7 +1919,8 @@ class Collection {
$this->set('submittedtime', time());
$this->set('submittedstatus', self::SUBMITTED);
$this->commit();
if (is_plugin_active('submissions', 'module') && $group) {
safe_require('module', 'submissions');
if (PluginModuleSubmissions::is_active() && $group) {
PluginModuleSubmissions::add_submission($this, $group);
}
db_commit();
......
......@@ -1678,7 +1678,10 @@ class View {
try {
db_begin();
self::_db_pendingrelease(array($this->get('id')));
PluginModuleSubmissions::pending_release_submission($this, $releaseuser);
safe_require('module', 'submissions');
if (PluginModuleSubmissions::is_active()) {
PluginModuleSubmissions::pending_release_submission($this, $releaseuser);
}
require_once(get_config('docroot') . 'export/lib.php');
add_submission_to_export_queue($this, $releaseuser, $externalid);
db_commit();
......@@ -1699,7 +1702,10 @@ class View {
try {
db_begin();
self::_db_release(array($this->id), $this->get('owner'), $this->get('submittedgroup'));
PluginModuleSubmissions::release_submission($this, $releaseuser);
safe_require('module', 'submissions');
if (PluginModuleSubmissions::is_active()) {
PluginModuleSubmissions::release_submission($this, $releaseuser);
}
db_commit();
}
catch (Exception $e) {
......@@ -7044,7 +7050,8 @@ class View {
try {
db_begin();
self::_db_submit(array($this->id), $group);
if (is_plugin_active('submissions', 'module')) {
safe_require('module', 'submissions');
if (PluginModuleSubmissions::is_active()) {
PluginModuleSubmissions::add_submission($this, $group);
}
db_commit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment