Skip to content

Commit

Permalink
Solving merge problem after last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenink committed Oct 10, 2017
0 parents commit 7144925
Show file tree
Hide file tree
Showing 11 changed files with 1,161 additions and 0 deletions.
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Contributing
We always welcome any type of code contribution. If you are interested in helping with the development, here you can find some brief indications about how to do it.

[Fork](https://help.github.com/articles/fork-a-repo/), then clone the repo:

```
git clone [email protected]:your-username/moodle-block_ejsapp_file_browser.git
```

Push to your fork and [submit a pull request](https://github.com/UNEDLabs/moodle-block_ejsapp_file_browser/compare/). A tutorial on how to do this can be found [here](https://yangsu.github.io/pull-request-tutorial/).

At this point, as we say in Spain, the ball is in our roof, meaning that now its our turn to do something. You can probably expect us to comment on your pull requests within three business days. We may suggest some changes or improvements or alternatives.

A couple of things that will increase the chance that your pull request is accepted:

Follow [Moodle's style guide](https://docs.moodle.org/33/en/MoodleDocs:Style_guide).
Write a good commit message.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##############
# LTI Sarlab #
##############

1. Content
==========

This plugin is an LTI subplugin that simplifies and enhances the connection with Sarlab 8.0.

Sarlab is a system for managing remote laboratory resources. More information about Sarlab can be found here:

2. License
==========

LTI Sarlab 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.

LTI Sarlab 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.

The GNU General Public License is available on <http://www.gnu.org/licenses/>

3. Installation
===============

If you downloaded this plugin from github, you will need to change the folder's name to sarlab. If you
downloaded it from Moodle.org, then you are fine.

This is a lti sub-plugin for Moodle so you should place the sarlab folder in your /mod/lti/source folder, inside your
Moodle installation directory.

4. Dependencies
===============

This plugin is used for providing direct connection to Sarlab from Moodle. You can register in Sarlab here:

5. Authors
==========

LTI Sarlab has been developed by:
- Luis de la Torre: [email protected]

at the Computer Science and Automatic Control Department, Spanish Open University (UNED), Madrid, Spain.
76 changes: 76 additions & 0 deletions db/access.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
// This file is part of the Moodle sub-plugin "LTI Sarlab"
//
// LTI Sarlab 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.
//
// LTI Sarlab 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/>.
//
// LTI Sarlab has been developed by:
// - Luis de la Torre: [email protected]
//
// at the Computer Science and Automatic Control, Spanish Open University
// (UNED), Madrid, Spain.

/**
* LTI Sarlab sub-plugin caps
*
* @package mod_lti_sarlab
* @copyright 2015 Luis de la Torre
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

$capabilities = array(

'ltisource/sarlab:addinstance' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
),
),

'ltisource/sarlab:view' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
),
),

'ltisource/sarlab:useexp' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'editingteacher' => CAP_ALLOW
),
),

'ltisource/sarlab:editexp' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
),
),

'ltisource/sarlab:createexp' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
),
)

);
65 changes: 65 additions & 0 deletions db/install.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php
// This file is part of the Moodle sub-plugin "LTI Sarlab"
//
// LTI Sarlab 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.
//
// LTI Sarlab 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/>.
//
// LTI Sarlab has been developed by:
// - Luis de la Torre: [email protected]
//
// at the Computer Science and Automatic Control, Spanish Open University
// (UNED), Madrid, Spain.

/**
* LTI Sarlab sub-plugin installation
*
* @package mod_lti_sarlab
* @copyright 2015 Luis de la Torre
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

function xmldb_ltisource_sarlab_install() {
global $DB;

// Get system context.
$context = context_system::instance();

// Create the experience designer role.
if (!$DB->record_exists('role', array('shortname' => 'sarlabdesigner'))) {
$sarlabdesignerid = create_role(get_string('sarlabdesigner', 'ltisource_sarlab'),
'sarlabdesigner', get_string('sarlabdesigner_desc', 'ltisource_sarlab'));
set_role_contextlevels($sarlabdesignerid, array(CONTEXT_SYSTEM));
// Assign capabilities.
assign_capability('ltisource/remlab_manager:view', CAP_ALLOW, $sarlabdesignerid, $context->id, true);
assign_capability('ltisource/remlab_manager:useeexp', CAP_ALLOW, $sarlabdesignerid, $context->id, true);
assign_capability('ltisource/remlab_manager:editexp', CAP_ALLOW, $sarlabdesignerid, $context->id, true);
assign_capability('ltisource/remlab_manager:createexp', CAP_ALLOW, $sarlabdesignerid, $context->id, true);
}


// Create the experience manager role.
if (!$DB->record_exists('role', array('shortname' => 'sarlabmanager'))) {
$sarlabmanagerid = create_role(get_string('sarlabmanager', 'ltisource_sarlab'),
'sarlabmanager', get_string('sarlabmanager_desc', 'ltisource_sarlab'));
set_role_contextlevels($sarlabmanagerid, array(CONTEXT_SYSTEM));
// Assign capabilities.
assign_capability('ltisource/remlab_manager:view', CAP_ALLOW, $sarlabmanagerid, $context->id, true);
assign_capability('ltisource/remlab_manager:useeexp', CAP_ALLOW, $sarlabmanagerid, $context->id, true);
assign_capability('ltisource/remlab_manager:editexp', CAP_ALLOW, $sarlabmanagerid, $context->id, true);
}

// Clear any capability caches
$context->mark_dirty();
}
41 changes: 41 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
// This file is part of the Moodle sub-plugin "LTI Sarlab"
//
// LTI Sarlab 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.
//
// LTI Sarlab 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/>.
//
// LTI Sarlab has been developed by:
// - Luis de la Torre: [email protected]
//
// at the Computer Science and Automatic Control, Spanish Open University
// (UNED), Madrid, Spain.

/**
* LTI Sarlab sub-plugin upgrade file
*
* @package mod_lti_sarlab
* @copyright 2015 Luis de la Torre
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

/**
* Upgrade function for the remlab manager block
*
* @param string $oldversion
* @return true
*/
function xmldb_ltisource_sarlab_upgrade($oldversion) {
return true;
}
49 changes: 49 additions & 0 deletions lang/en/ltisource_sarlab.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
// This file is part of the Moodle sub-plugin "LTI Sarlab"
//
// LTI Sarlab 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.
//
// LTI Sarlab 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/>.
//
// LTI Sarlab has been developed by:
// - Luis de la Torre: [email protected]
//
// at the Computer Science and Automatic Control, Spanish Open University
// (UNED), Madrid, Spain.

/**
* English language file for the LTI Sarlab sub-plugin
*
* @package mod_lti_sarlab
* @copyright 2015 Luis de la Torre
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die;

$string['pluginname'] = 'LTI Sarlab';
$string['addsarlab'] = 'Sarlab';
$string['addsarlab_help'] = 'Sarlab is a system that facilitates the management of remote laboratories. This activity enables LTI access to its software';
$string['modsarlabname'] = 'lti:Sarlab';

// Strings for capabilities.
$string['sarlab:addinstance'] = 'Add new Sarlab LTI activities';
$string['sarlab:view'] = 'View Sarlab LTI activities';
$string['sarlab:useexp'] = 'Assign existing Sarlab experiences to EJSApp activities';
$string['sarlab:editexp'] = 'Edit existing Sarlab experiences';
$string['sarlab:createexp'] = 'Create and delete Sarlab experiences';

// Strings for new roles.
$string['sarlabdesigner'] = 'Sarlab designer';
$string['sarlabdesigner_desc'] = 'Sarlab designers can create, delete, edit and use Sarlab experiences';
$string['sarlabmanager'] = 'Sarlab manager';
$string['sarlabmanager_desc'] = 'Sarlab managers can edit and use existing Sarlab experiences';
Loading

0 comments on commit 7144925

Please sign in to comment.