Skip to content

Commit

Permalink
MDL-58939 portfolio: Remove picasa portfolio
Browse files Browse the repository at this point in the history
Picasa is discontinued since 2016 so portfolio_picasa has been
removed from core Moodle.
  • Loading branch information
sarjona committed Sep 17, 2021
1 parent 5ea3545 commit ba06999
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 377 deletions.
3 changes: 2 additions & 1 deletion lib/classes/plugin_manager.php
Expand Up @@ -1725,6 +1725,7 @@ public static function is_deleted_standard_plugin($type, $name) {
'block' => array('course_overview', 'messages', 'community', 'participants'),
'cachestore' => array('memcache'),
'enrol' => array('authorize'),
'portfolio' => array('picasa'),
'qformat' => array('webct'),
'message' => array('jabber'),
'quizaccess' => array('safebrowser'),
Expand Down Expand Up @@ -1933,7 +1934,7 @@ public static function standard_plugins_list($type) {
),

'portfolio' => array(
'boxnet', 'download', 'flickr', 'googledocs', 'mahara', 'picasa'
'boxnet', 'download', 'flickr', 'googledocs', 'mahara'
),

'profilefield' => array(
Expand Down
24 changes: 24 additions & 0 deletions lib/db/upgrade.php
Expand Up @@ -2778,5 +2778,29 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2021091100.02);
}

if ($oldversion < 2021091700.01) {
// If portfolio_picasa is no longer present, remove it.
if (!file_exists($CFG->dirroot . '/portfolio/picasa/version.php')) {
$instance = $DB->get_record('portfolio_instance', ['plugin' => 'picasa']);
if (!empty($instance)) {
// Remove all records from portfolio_instance_config.
$DB->delete_records('portfolio_instance_config', ['instance' => $instance->id]);
// Remove all records from portfolio_instance_user.
$DB->delete_records('portfolio_instance_user', ['instance' => $instance->id]);
// Remove all records from portfolio_log.
$DB->delete_records('portfolio_log', ['portfolio' => $instance->id]);
// Remove all records from portfolio_tempdata.
$DB->delete_records('portfolio_tempdata', ['instance' => $instance->id]);
// Remove the record from the portfolio_instance table.
$DB->delete_records('portfolio_instance', ['id' => $instance->id]);
}

// Clean config.
unset_all_config_for_plugin('portfolio_picasa');
}

upgrade_main_savepoint(true, 2021091700.01);
}

return true;
}
2 changes: 1 addition & 1 deletion portfolio/googledocs/lang/en/portfolio_googledocs.php
Expand Up @@ -27,7 +27,7 @@
$string['nooauthcredentials'] = 'OAuth credentials required.';
$string['nooauthcredentials_help'] = 'To use the Google Drive portfolio plugin you must configure OAuth credentials in the portfolio settings.';
$string['nosessiontoken'] = 'A session token does not exist preventing export to google.';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p><p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Drive and Picasa plugins.</p>';
$string['oauthinfo'] = '<p>To use this plugin, you must register your site with Google, as described in the documentation <a href="{$a->docsurl}">Google OAuth 2.0 setup</a>.</p><p>As part of the registration process, you will need to enter the following URL as \'Authorized Redirect URIs\':</p><p>{$a->callbackurl}</p><p>Once registered, you will be provided with a client ID and secret which can be used to configure all Google Drive plugins.</p>';
$string['pluginname'] = 'Google Drive';
$string['privacy:metadata'] = 'This plugin sends data externally to a linked Google account. It does not store data locally.';
$string['privacy:metadata:data'] = 'Personal data passed through from the portfolio subsystem.';
Expand Down
80 changes: 0 additions & 80 deletions portfolio/picasa/classes/privacy/provider.php

This file was deleted.

39 changes: 0 additions & 39 deletions portfolio/picasa/db/upgrade.php

This file was deleted.

34 changes: 0 additions & 34 deletions portfolio/picasa/lang/en/portfolio_picasa.php

This file was deleted.

145 changes: 0 additions & 145 deletions portfolio/picasa/lib.php

This file was deleted.

0 comments on commit ba06999

Please sign in to comment.