first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,153 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for repository_flickr.
*
* @package repository_flickr
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace repository_flickr\privacy;
use core_privacy\local\metadata\collection;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\context;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist;
use core_privacy\local\request\writer;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for repository_flickr implementing metadata, plugin, and user_preference providers.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\core_userlist_provider,
\core_privacy\local\request\plugin\provider,
\core_privacy\local\request\user_preference_provider
{
/**
* Returns meta data about this system.
*
* @param collection $collection The initialised collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $collection): collection {
$collection->add_external_location_link(
'flickr.com',
[
'text' => 'privacy:metadata:repository_flickr:text'
],
'privacy:metadata:repository_flickr'
);
// Flickr preferences.
$collection->add_user_preference(
'repository_flickr_access_token',
'privacy:metadata:repository_flickr:preference:repository_flickr_access_token'
);
$collection->add_user_preference(
'repository_flickr_access_token_secret',
'privacy:metadata:repository_flickr:preference:repository_flickr_access_token_secret'
);
return $collection;
}
/**
* Get the list of contexts that contain user information for the specified user.
*
* @param int $userid The user to search.
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
*/
public static function get_contexts_for_userid(int $userid): contextlist {
return new contextlist();
}
/**
* Get the list of users who have data within a context.
*
* @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
*/
public static function get_users_in_context(userlist $userlist) {
}
/**
* Export all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts to export information for.
*/
public static function export_user_data(approved_contextlist $contextlist) {
}
/**
* Delete all data for all users in the specified context.
*
* @param context $context The specific context to delete data for.
*/
public static function delete_data_for_all_users_in_context(\context $context) {
}
/**
* Delete all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
*/
public static function delete_data_for_user(approved_contextlist $contextlist) {
}
/**
* Delete multiple users within a single context.
*
* @param approved_userlist $userlist The approved context and user information to delete information for.
*/
public static function delete_data_for_users(approved_userlist $userlist) {
}
/**
* Export all user preferences for the plugin.
*
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function export_user_preferences(int $userid) {
$accesstoken = get_user_preferences('repository_flickr_access_token', null, $userid);
if ($accesstoken !== null) {
writer::export_user_preference(
'repository_flickr',
'repository_flickr_access_token',
$accesstoken,
get_string('privacy:metadata:repository_flickr:preference:repository_flickr_access_token', 'repository_flickr')
);
}
$accesstokensecret = get_user_preferences('repository_flickr_access_token_secret', null, $userid);
if ($accesstokensecret !== null) {
writer::export_user_preference(
'repository_flickr',
'repository_flickr_access_token_secret',
'',
get_string('privacy:metadata:repository_flickr:preference:repository_flickr_access_token_secret', 'repository_flickr')
);
}
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Plugin capabilities.
*
* @package repository_flickr
* @copyright 2009 Dongsheng Cai
* @author Dongsheng Cai <dongsheng@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$capabilities = array(
'repository/flickr:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'user' => CAP_ALLOW
)
)
);
+46
View File
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Plugin upgrade steps are defined here.
*
* @package repository_flickr
* @category upgrade
* @copyright 2017 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Execute repository_flickr upgrade from the given old version.
*
* @param int $oldversion
* @return bool
*/
function xmldb_repository_flickr_upgrade($oldversion) {
// Automatically generated Moodle v4.1.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -0,0 +1,49 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for component 'repository_flickr', language 'en', branch 'MOODLE_20_STABLE'
*
* @package repository_flickr
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['apikey'] = 'API key';
$string['callbackurl'] = 'Callback URL';
$string['callbackurltext'] = '<ol>
<li>Visit <a href="http://www.flickr.com/services/api/keys/">Flickr API Keys</a> again.</li>
<li>Make sure you set the callback URL for this Flickr key as <strong>{$a}</strong></li></ol>';
$string['callbackwarning'] = '<ol>
<li>Get a <a href="http://www.flickr.com/services/api/keys/">Flickr API Key and Secret</a> from Flickr for this Moodle site.</li>
<li>Enter those details here, then click Save and then Settings to come back to this page. You will see that Moodle has generated a callback URL for you.</li>
<li>Edit your <a href="http://www.flickr.com/services/api/keys/">Flickr</a> key details again and set the callback URL.</li></ol>';
$string['configplugin'] = 'Flickr configuration';
$string['emailaddress'] = 'Email address';
$string['flickr:view'] = 'View Flickr repository';
$string['invalidemail'] = 'Invalid email address for flickr';
$string['notitle'] = 'notitle';
$string['nullphotolist'] = 'There are no photos in this account';
$string['remember'] = 'Remember me';
$string['pluginname_help'] = 'Repository on flickr.com';
$string['pluginname'] = 'Flickr';
$string['secret'] = 'Secret';
$string['username'] = 'Flickr account email';
$string['privacy:metadata:repository_flickr'] = 'The Flickr repository plugin does store user preferences, and transmits user data from Moodle to the remote system.';
$string['privacy:metadata:repository_flickr:text'] = 'The Flickr repository user search text query.';
$string['privacy:metadata:repository_flickr:preference:repository_flickr_access_token'] = 'The Flickr repository OAuth token preference.';
$string['privacy:metadata:repository_flickr:preference:repository_flickr_access_token_secret'] = 'The Flickr repository OAuth secret preference; this is excluded from privacy data exports.';
+397
View File
@@ -0,0 +1,397 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This plugin is used to access flickr pictures
*
* @since Moodle 2.0
* @package repository_flickr
* @copyright 2010 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/repository/lib.php');
require_once($CFG->libdir.'/flickrclient.php');
/**
* This plugin is used to access user's private flickr repository
*
* @since Moodle 2.0
* @package repository_flickr
* @copyright 2009 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class repository_flickr extends repository {
/** @var flickr_client */
protected $flickr;
/** @var string oauth consumer key */
protected $api_key;
/** @var string oauth consumer secret */
protected $secret;
/** @var string oauth access token */
protected $accesstoken;
/** @var string oauth access token secret */
protected $accesstokensecret;
public $photos;
/**
* Stores sizes of images to prevent multiple API call
*/
static private $sizes = array();
/**
*
* @param int $repositoryid
* @param object $context
* @param array $options
*/
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
global $SESSION, $CFG;
$options['page'] = optional_param('p', 1, PARAM_INT);
parent::__construct($repositoryid, $context, $options);
$this->api_key = $this->get_option('api_key');
$this->secret = $this->get_option('secret');
$this->accesstoken = get_user_preferences('repository_flickr_access_token');
$this->accesstokensecret = get_user_preferences('repository_flickr_access_token_secret');
$callbackurl = new moodle_url('/repository/repository_callback.php', ['repo_id' => $repositoryid]);
$this->flickr = new flickr_client($this->api_key, $this->secret, $callbackurl);
$this->flickr->set_access_token($this->accesstoken, $this->accesstokensecret);
}
/**
* Check if the user has authorized us to make requests to Flickr API.
*
* @return bool
*/
public function check_login() {
if (empty($this->accesstoken) || empty($this->accesstokensecret)) {
return false;
} else {
return true;
}
}
/**
* Purge the stored access token and related user data.
*
* @return string
*/
public function logout() {
set_user_preference('repository_flickr_access_token', null);
set_user_preference('repository_flickr_access_token_secret', null);
$this->accesstoken = null;
$this->accesstokensecret = null;
return $this->print_login();
}
/**
*
* @param array $options
* @return mixed
*/
public function set_option($options = array()) {
if (!empty($options['api_key'])) {
set_config('api_key', trim($options['api_key']), 'flickr');
}
if (!empty($options['secret'])) {
set_config('secret', trim($options['secret']), 'flickr');
}
unset($options['api_key']);
unset($options['secret']);
$ret = parent::set_option($options);
return $ret;
}
/**
*
* @param string $config
* @return mixed
*/
public function get_option($config = '') {
if ($config==='api_key') {
return trim(get_config('flickr', 'api_key'));
} elseif ($config ==='secret') {
return trim(get_config('flickr', 'secret'));
} else {
$options['api_key'] = trim(get_config('flickr', 'api_key'));
$options['secret'] = trim(get_config('flickr', 'secret'));
}
$options = parent::get_option($config);
return $options;
}
/**
*
* @return bool
*/
public function global_search() {
if (empty($this->accesstoken)) {
return false;
} else {
return true;
}
}
/**
* Show the interface to log in to Flickr..
*
* @return string|array
*/
public function print_login() {
$reqtoken = $this->flickr->request_token();
$this->flickr->set_request_token_secret(['caller' => 'repository_flickr'], $reqtoken['oauth_token_secret']);
// Even when the Flick auth docs states the "perms" argument is
// optional, it does not work without it.
$authurl = new moodle_url($reqtoken['authorize_url'], array('perms' => 'read'));
if ($this->options['ajax']) {
return [
'login' => [
[
'type' => 'popup',
'url' => $authurl->out(false),
],
],
];
} else {
echo '<a target="_blank" href="'.$authurl->out().'">'.get_string('login', 'repository').'</a>';
}
}
/**
* Search for the user's photos at Flickr
*
* @param string $searchtext Photos with title, description or tags containing the text will be returned
* @param int $page Page number to load
* @return array
*/
public function search($searchtext, $page = 0) {
$response = $this->flickr->call('photos.search', [
'user_id' => 'me',
'per_page' => 24,
'extras' => 'original_format,url_sq,url_o,date_upload,last_update,owner_name,license',
'page' => $page,
'text' => $searchtext,
]);
if ($response === false) {
$this->logout();
return [];
}
// Convert the response to the format expected by the filepicker.
$ret = [
'manage' => 'https://www.flickr.com/photos/organize',
'list' => [],
'pages' => $response->photos->pages,
'total' => $response->photos->total,
'perpage' => $response->photos->perpage,
'page' => $response->photos->page,
];
if (!empty($response->photos->photo)) {
foreach ($response->photos->photo as $p) {
if (empty($p->title)) {
$p->title = get_string('notitle', 'repository_flickr');
}
if (isset($p->originalformat)) {
$format = $p->originalformat;
} else {
$format = 'jpg';
}
$format = '.'.$format;
// Append extension to the file name.
if (substr($p->title, strlen($p->title) - strlen($format)) != $format) {
$p->title .= $format;
}
// Perform a HEAD request to the image to obtain it's Content-Length.
$curl = new curl();
$curl->head($p->url_o);
$ret['list'][] = [
'title' => $p->title,
'source' => $p->id,
'id' => $p->id,
'thumbnail' => $p->url_sq,
'datecreated' => $p->dateupload,
'datemodified' => $p->lastupdate,
'url' => $p->url_o,
'author' => $p->ownername,
'size' => (int)($curl->get_info()['download_content_length']),
'image_width' => $p->width_o,
'image_height' => $p->height_o,
'license' => $this->license4moodle((int) $p->license),
];
}
}
// Filter file listing to display specific types only.
$ret['list'] = array_filter($ret['list'], array($this, 'filter'));
return $ret;
}
/**
* Map Flickr license ID to those used internally by Moodle
*
* @param int $licenseid
* @return string
*/
public function license4moodle(int $licenseid): string {
$license = [
0 => 'allrightsreserved',
1 => 'cc-nc-sa',
2 => 'cc-nc',
3 => 'cc-nc-nd',
4 => 'cc',
5 => 'cc-sa',
6 => 'cc-nd',
7 => 'other'
];
return $license[$licenseid];
}
/**
*
* @param string $path
* @param int $page
* @return array
*/
public function get_listing($path = '', $page = '') {
return $this->search('', $page);
}
public function get_link($photoid) {
return $this->flickr->get_photo_url($photoid);
}
/**
*
* @param string $photoid
* @param string $file
* @return string
*/
public function get_file($photoid, $file = '') {
return parent::get_file($this->flickr->get_photo_url($photoid), $file);
}
/**
* Add Plugin settings input to Moodle form
* @param object $mform
*/
public static function type_config_form($mform, $classname = 'repository') {
global $CFG;
$api_key = get_config('flickr', 'api_key');
$secret = get_config('flickr', 'secret');
if (empty($api_key)) {
$api_key = '';
}
if (empty($secret)) {
$secret = '';
}
parent::type_config_form($mform);
$strrequired = get_string('required');
$mform->addElement('text', 'api_key', get_string('apikey', 'repository_flickr'), array('value'=>$api_key,'size' => '40'));
$mform->setType('api_key', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'repository_flickr'), array('value'=>$secret,'size' => '40'));
$mform->setType('secret', PARAM_RAW_TRIMMED);
//retrieve the flickr instances
$params = array();
$params['context'] = array();
//$params['currentcontext'] = $this->context;
$params['onlyvisible'] = false;
$params['type'] = 'flickr';
$instances = repository::get_instances($params);
if (empty($instances)) {
$callbackurl = get_string('callbackwarning', 'repository_flickr');
$mform->addElement('static', null, '', $callbackurl);
} else {
$instance = array_shift($instances);
$callbackurl = $CFG->wwwroot.'/repository/repository_callback.php?repo_id='.$instance->id;
$mform->addElement('static', 'callbackurl', '', get_string('callbackurltext', 'repository_flickr', $callbackurl));
}
$mform->addRule('api_key', $strrequired, 'required', null, 'client');
$mform->addRule('secret', $strrequired, 'required', null, 'client');
}
/**
* Names of the plugin settings
* @return array
*/
public static function get_type_option_names() {
return array('api_key', 'secret', 'pluginname');
}
public function supported_filetypes() {
return array('web_image');
}
public function supported_returntypes() {
return (FILE_INTERNAL | FILE_EXTERNAL);
}
/**
* Return the source information
*
* @param string $photoid
* @return string|null
*/
public function get_file_source_info($photoid) {
return $this->flickr->get_photo_url($photoid);
}
/**
* Handle the oauth authorize callback
*
* This is to exchange the approved request token for an access token.
*/
public function callback() {
$token = required_param('oauth_token', PARAM_RAW);
$verifier = required_param('oauth_verifier', PARAM_RAW);
$secret = $this->flickr->get_request_token_secret(['caller' => 'repository_flickr']);
// Exchange the request token for the access token.
$accesstoken = $this->flickr->get_access_token($token, $secret, $verifier);
// Store the access token and the access token secret in the user preferences.
set_user_preference('repository_flickr_access_token', $accesstoken['oauth_token']);
set_user_preference('repository_flickr_access_token_secret', $accesstoken['oauth_token_secret']);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

+53
View File
@@ -0,0 +1,53 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Flickr repository data generator
*
* @package repository_flickr
* @category test
* @copyright 2013 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Flickr repository data generator class
*
* @package repository_flickr
* @category test
* @copyright 2013 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class repository_flickr_generator extends testing_repository_generator {
/**
* Fill in type record defaults.
*
* @param array $record
* @return array
*/
protected function prepare_type_record(array $record) {
$record = parent::prepare_type_record($record);
if (!isset($record['api_key'])) {
$record['api_key'] = 'api_key';
}
if (!isset($record['secret'])) {
$record['secret'] = 'secret';
}
return $record;
}
}
@@ -0,0 +1,87 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy tests for repository_flickr.
*
* @package repository_flickr
* @category test
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace repository_flickr\privacy;
defined('MOODLE_INTERNAL') || die();
use repository_flickr\privacy\provider;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\writer;
use core_privacy\tests\provider_testcase;
/**
* Unit tests for repository/flickr/privacy/provider
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider_test extends provider_testcase {
/**
* Overriding setUp() function to always reset after tests.
*/
public function setUp(): void {
$this->resetAfterTest(true);
}
/**
* Test for provider::export_user_preferences().
*/
public function test_export_user_preferences(): void {
global $DB;
// Test setup.
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
$contextlist = provider::get_contexts_for_userid($user->id);
$approvedcontextlist = new approved_contextlist($user, 'repository_flickr', $contextlist->get_contextids());
$user = $approvedcontextlist->get_user();
$contextuser = \context_user::instance($user->id);
// Test exporting of Flickr repository user preferences *without* OAuth token/secret preference configured.
provider::export_user_preferences($user->id);
$writer = writer::with_context($contextuser);
// Verify there is no user preferences data exported.
$this->assertFalse($writer->has_any_data());
// Test exporting of Flickr repository user preferences *with* OAuth token/secret preference configured.
set_user_preferences([
'repository_flickr_access_token' => 'dummy flickr oauth access token',
'repository_flickr_access_token_secret' => 'dummy flickr oauth access token secret',
], $user->id);
provider::export_user_preferences($user->id);
$writer = writer::with_context($contextuser);
// Verify there is user preferences data exported.
$this->assertTrue($writer->has_any_data());
$userpreferences = $writer->get_user_preferences('repository_flickr');
// Verify the OAuth token is not an empty string value and the OAuth secret is an empty string value.
$accesstoken = $userpreferences->repository_flickr_access_token;
$this->assertFalse(empty($accesstoken->value));
$accesstokensecret = $userpreferences->repository_flickr_access_token_secret;
$this->assertTrue(empty($accesstokensecret->value));
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version details
*
* @package repository
* @subpackage flickr
* @copyright 2009 Dongsheng Cai
* @author Dongsheng Cai <dongsheng@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2024042200; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2024041600; // Requires this Moodle version.
$plugin->component = 'repository_flickr'; // Full name of the plugin (used for diagnostics)