Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 6395df08 authored by Francois Gannaz's avatar Francois Gannaz
Browse files

doc and phpdoc

parent 58b0ad55
# LabNbook
Access to LabNbook through a Moodle activity.
This Moodle plugin provides access to LabNbook through a Moodle activity.
This provides an activity plugin for Moodle that connects
to a LabNbook platform from a Moodle instance.
After installation, this plugin must be configured to exchange with a LabnBook instance.
Then the editing teacher will have access to a new activity type: "LabNbook".
The students that enter such an activity will work on the Labnbook site,
without the need to authenticate separately.
## Install
......@@ -18,7 +20,9 @@ git clone https://gricad-gitlab.univ-grenoble-alpes.fr/labnbook/moodle-labnbook
php admin/cli/upgrade.php
```
Then login into Moodle, input the URL of the LabNbook site,
Then login into Moodle with an admin account.
You will be prompted for the new plugin configuration.
Input the URL of the LabNbook web API,
and follow the on-screen instructions.
......
......@@ -2,6 +2,8 @@
/**
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @package mod_labnbook
* @copyright 2019 Université Grenoble Alpes
*/
namespace mod_labnbook\ar;
......@@ -9,7 +11,7 @@ namespace mod_labnbook\ar;
/* @var $DB \moodle_database */
/**
* AR class that map the "labnbook" table in the DB.
* Active Record class that map the "labnbook" table in the DB to a PHP object.
*/
class labnbook
{
......
......@@ -8,6 +8,9 @@
namespace mod_labnbook\fetch;
/**
* Environment of a fetcher, which will produce the base for the JWT payload.
*/
class environment
{
/**
......
......@@ -8,6 +8,9 @@
namespace mod_labnbook\fetch;
/**
* Send queries to the LabnBook API as an authenticated LnB institution.
*/
class institution extends moodlefetcher
{
const OK = 200;
......
......@@ -8,6 +8,11 @@
namespace mod_labnbook\fetch;
/**
* Integrate Moodle needs to the composed fetcher.
* It fills data and actions for the communication with LabnBook through a fetcher.
* It will be extended by 2 classes, for exchanges as a LnB institution or a LnB user.
*/
abstract class moodlefetcher
{
/**
......
......@@ -8,6 +8,9 @@
namespace mod_labnbook\fetch;
/**
* Send queries to the LabnBook API as an authenticated LnB user.
*/
class user extends moodlefetcher
{
const ERROR_TOKEN_NOTVALID = 401;
......
<?php
/**
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @package mod_labnbook
* @copyright 2019 Université Grenoble Alpes
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
......
<?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/>.
/**
* Defines {@link \mod_labnbook\privacy\provider} class.
......@@ -29,9 +15,6 @@ defined('MOODLE_INTERNAL') || die();
/**
* Privacy API implementation for the LabNbook plugin.
*
* @copyright 2019 Université Grenoble Alpes
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
......
<?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 are defined here.
......
<?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.
......@@ -34,16 +20,14 @@ require_once(__DIR__.'/upgradelib.php');
* @return bool
*/
function xmldb_labnbook_upgrade($oldversion) {
/*
global $DB;
$dbman = $DB->get_manager();
// For further information please read the Upgrade API documentation:
// https://docs.moodle.org/dev/Upgrade_API
//
// You will also have to create the db/install.xml file by using the XMLDB Editor.
// Documentation for the XMLDB Editor can be found at:
// https://docs.moodle.org/dev/XMLDB_editor
*/
return true;
}
......@@ -259,9 +259,9 @@ function labnbook_update_grades($moduleinstance, $userid = 0) {
* This can be called by an AJAX request so do not rely on $PAGE as it might not be set up properly.
*
* @param navigation_node $labnbooknode An object representing the navigation tree node.
* @param stdClass $course.
* @param stdClass $module.
* @param cm_info $cm.
* @param stdClass $course
* @param stdClass $module
* @param cm_info $cm
*/
function labnbook_extend_navigation($labnbooknode, $course, $module, $cm) {
}
......
<?php
/**
* Prints an instance of mod_labnbook.
* Displays an instance of mod_labnbook according to the user's permission.
*
* @package mod_labnbook
* @copyright 2019 Université Grenoble Alpes
......
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