MDL-32117 equella: add missing MOODLE_INTERNAL + phpdocs tidy

This commit is contained in:
Eloy Lafuente (stronk7) 2012-06-12 01:40:14 +02:00
parent 37b8257de5
commit 74ea1b95f4
5 changed files with 54 additions and 6 deletions

View File

@ -15,10 +15,10 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* EQUELLA callback
* Callback for equella repository.
*
* @since 2.0
* @package repository
* @since 2.3
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

View File

@ -14,6 +14,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Capabilities for equella repository.
*
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @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/equella:view' => array(
'captype' => 'read',

View File

@ -13,6 +13,15 @@
//
// 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 equella repository.
*
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['pluginname'] = 'EQUELLA repository';
$string['configplugin'] = 'Configuration for EQUELLA repository';
$string['search'] = 'Search EQUELLA';

View File

@ -14,8 +14,27 @@
// 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 equella repositories.
*
* @since 2.3
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/repository/lib.php');
/**
* repository_equella class implements equella_client
*
* @since 2.3
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class repository_equella extends repository {
/** @var array mimetype filter */
private $mimetypes = array();
@ -24,7 +43,7 @@ class repository_equella extends repository {
* Constructor
*
* @param int $repositoryid repository instance id
* @param int|stdClass a context id or context object
* @param int|stdClass $context a context id or context object
* @param array $options repository options
*/
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
@ -43,7 +62,7 @@ class repository_equella extends repository {
*
* @param string $path
* @param mixed $page
* @param array
* @return array
*/
public function get_listing($path = null, $page = null) {
global $COURSE;
@ -219,7 +238,7 @@ class repository_equella extends repository {
* @return array
*/
public static function get_instance_option_names() {
$rv = array('equella_url','equella_select_restriction', 'equella_options',
$rv = array('equella_url', 'equella_select_restriction', 'equella_options',
'equella_shareid', 'equella_sharedsecret'
);

View File

@ -14,6 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for equella repository.
*
* @since 2.3
* @package repository_equella
* @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012060100; // The current plugin version (Date: YYYYMMDDXX).