Skip to content

Commit 41670af

Browse files
mvidbergbrentboghosian
authored andcommitted
ELIS-8632 Initial move of blocks/rlip to local/datahub
0 parents  commit 41670af

File tree

305 files changed

+88861
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+88861
-0
lines changed

README.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
2+
ELIS 2.5 System Requirements
3+
============================
4+
5+
The requirements for ELIS are the same as Moodle -- [Moodle 2.5 System requirements][moodle_requirements]
6+
7+
* *NOTE:* ELIS is currently not fully compatible with PostgreSQL.
8+
9+
Alfresco
10+
--------
11+
12+
Remote-Learner works exclusively with the Enterprise version of Alfresco. Our
13+
integration should work with the community release but has not been tested against
14+
that codebase. Currently the Alfresco integration is only compatible with the
15+
3.2 or 3.4 release series of Alfresco.
16+
17+
18+
General Structure
19+
=================
20+
21+
Each repository is structured this way:
22+
23+
1. `addons` subdirectory - specific plug-ins used by the integration
24+
2. `core` subdirectory - files and subdirectories added directly to the Moodle
25+
application that do not overwrite existing Moodle files
26+
3. `patches` subdirectory - diff patches to be applied to specific Moodle core
27+
files
28+
4. `version.php` - the specific version of Moodle this archive was applied to
29+
30+
The patches _should_ work against your version of Moodle, but there may be other
31+
differences that could affect it. It may be necessary to examine your code with
32+
the patch file to correctly apply it.
33+
34+
35+
ELIS Documentation
36+
==================
37+
38+
* [ELIS 2013 Manual][elis_docs_home]
39+
* [ELIS release notes][elis_release_notes]
40+
41+
42+
Component Repositories
43+
======================
44+
45+
[elis.base][elis_repo_branch_base]
46+
---------------------------
47+
48+
This repository contains some base modifications to Moodle which are required for
49+
other ELIS components.
50+
51+
[elis.cm][elis_repo_branch_cm]
52+
------------------------------
53+
54+
This repository contains the ELIS Program Management component.
55+
56+
#### [Component documentation][elis_docs_home]
57+
58+
[moodle-block\_php\_report][elis_repo_branch_reporting]
59+
--------------------
60+
61+
This repository contains the ELIS Reporting component.
62+
63+
#### [Component documentation][elis_docs_reporting]
64+
65+
[elis.alfresco][elis_repo_branch_alfresco]
66+
------------------------------------------
67+
68+
This repository contains the ELIS Files (Alfresco integration) component.
69+
70+
#### [Component documentation][elis_files_docs]
71+
72+
### Alfresco special setup instructions
73+
74+
The Remote-Learner Alfresco integration requires some custom web scripts to be
75+
deployed into the Alfresco repository. These scripts are found within the
76+
elis.alfresco repository in the following path:
77+
78+
* `/core/file/repository/alfresco/webscripts/`
79+
80+
All of those files need to be installed within the Alfresco repository. There are
81+
two ways of doing this current:
82+
83+
1. Install directly into the Alfresco application file structure:
84+
1. Shutdown the Alfresco instance
85+
2. Copy all of the web scripts into the following location on the filesystem
86+
(assuming Alfresco is installed at `/opt/alfresco/`):
87+
`/opt/alfresco/tomcat/shared/classes/alfresco/extension/templates/webscripts/moodle/`
88+
3. Start the Alfresco instance
89+
4. Visit the following URL on your Alfresco install (assuming the Alfresco
90+
web application is accessible via `http://myalfrescourl:8080/alfresco/`):
91+
`http://myalfrescourl:8080/alfresco/s/`
92+
5. Click on the Refresh Web Scripts button
93+
6. When this process has finished it should report no errors and tell you
94+
that it has found more web scripts than were previously already there
95+
2. Install into the repository itself
96+
1. Log into the Alfresco web application with an administrator account
97+
2. Navigate to the following path in the repository:
98+
`/Company Home/Data Dictionary/Web Scripts Extensions/`
99+
3. Create the the following directory structure within the *Web Scripts
100+
Extensions* folder: `org/moodle` (so that you end up with the following
101+
hierarchy: `Web Scripts Extensions/org/moodle`)
102+
4. Upload all of the webscripts files into the new *moodle* folder
103+
5. Visit the following URL on your Alfresco install (assuming the Alfresco
104+
web application is accessible via `http://myalfrescourl:8080/alfresco/`):
105+
* `http://myalfrescourl:8080/alfresco/s/`
106+
6. Click on the *Refresh Web Scripts* button
107+
7. When this process has finished it should report no errors and tell you
108+
that it has found more web scripts than were previously already there
109+
110+
OpenID (optional)
111+
-----------------
112+
113+
We supply two plugins for Moodle to allow users to authenticate into Moodle via OpenID:
114+
1. An authentication plugin
115+
2. A block which allows users not currently authenticated via OpenID to switch
116+
their authentication method to use a valid OpenID source.
117+
118+
#### [Component documentation][elis_docs_openid]
119+
120+
*NOTE:* This work is based off of an existing but abandoned project for Moodle 1.8
121+
and Moodle 1.9 by [Stuart Metcalfe][stuart_metcalfe]
122+
123+
* [Authentication Method: OpenID plugin][moodle_org_openid]
124+
* [Openid for Moodle][openid_original_source]
125+
126+
Dependencies
127+
============
128+
129+
The OpenID component does not depend on anything other than having a functioning
130+
Moodle install. The dependency chart below explains how each of the components
131+
depends on one another and Moodle itself.
132+
133+
![ELIS Community Dependencies][img_depdencies]
134+
135+
136+
How to get the code
137+
===================
138+
139+
The code is currently available in Remote-Learner's Github repositories. You can
140+
browse the code via our Github account here -- [https://github.com/remotelearner][github_remotelearner]
141+
142+
Direct access to each of the Remote-Learner ELIS Community repositories is
143+
available at the following URLs:
144+
145+
* *elis.base* --- [https://github.com/remotelearner/elis.base][elis_repo_base]
146+
* *elis.cm* --- [https://github.com/remotelearner/elis.cm][elis_repo_cm]
147+
* *elis.alfresco* --- [https://github.com/remotelearner/elis.alfresco][elis_repo_alfresco]
148+
* *moodle-block_php_report* --- [https://github.com/remotelearner/moodle-block\_php\_report][elis_repo_reporting]
149+
150+
Optional:
151+
152+
* *moodle-auth_openid* --- [https://github.com/remotelearner/moodle-auth\_openid][elis_repo_auth_openid]
153+
* *moodle-block_openid* --- [https://github.com/remotelearner/moodle-block\_openid][elis_repo_block_openid]
154+
155+
Each repository includes the ability to both fork or clone the code via Git itself
156+
or download a zip or tarball package of the code.
157+
158+
The direct download zip archive links for the latest version of the code in each
159+
ELIS community repository are as follows:
160+
161+
* *elis.base* --- [MOODLE\_25\_STABLE][zipdl_elis_base]
162+
* *elis.cm* --- [MOODLE\_25\_STABLE][zipdl_elis_cm]
163+
* *moodle-block_php_report* --- [MOODLE\_25\_STABLE][zipdl_elis_reporting]
164+
* *elis.alfresco* --- [MOODLE\_25\_STABLE][zipdl_elis_alfresco]
165+
166+
Optional:
167+
168+
* *moodle-auth_openid* --- [MOODLE\_25\_STABLE][zipdl_auth_openid]
169+
* *moodle-block_openid* --- [MOODLE\_25\_STABLE][zipdl_block_openid]
170+
171+
172+
[moodle_requirements]: http://docs.moodle.org/dev/Moodle_2.5_release_notes#Requirements
173+
[elis_docs_home]: http://rlcommunity.remote-learner.net/mod/book/view.php?id=69
174+
[elis_release_notes]: http://rlcommunity.remote-learner.net/course/view.php?id=2
175+
[elis_files_docs]: http://rlcommunity.remote-learner.net/mod/book/view.php?id=65
176+
[elis_docs_reporting]: http://rlcommunity.remote-learner.net/mod/book/view.php?id=69&chapterid=902
177+
[elis_docs_openid]: http://rlcommunity.remote-learner.net/mod/book/view.php?id=26
178+
[stuart_metcalfe]: https://launchpad.net/~stuartmetcalfe
179+
[moodle_org_openid]: https://moodle.org/mod/data/view.php?d=13&rid=928]
180+
[openid_original_source]: https://launchpad.net/moodle-openid
181+
[img_depdencies]: https://raw.github.com/remotelearner/elis.base/MOODLE_25_STABLE/elis_community_dependencies.png
182+
[github_remotelearner]: https://github.com/remotelearner
183+
[elis_repo_base]: https://github.com/remotelearner/elis.base
184+
[elis_repo_cm]: https://github.com/remotelearner/elis.cm
185+
[elis_repo_alfresco]: https://github.com/remotelearner/elis.alfresco
186+
[elis_repo_reporting]: https://github.com/remotelearner/moodle-block_php_report
187+
[elis_repo_auth_openid]: https://github.com/remotelearner/moodle-auth_openid
188+
[elis_repo_block_openid]: https://github.com/remotelearner/moodle-block_openid
189+
[elis_repo_branch_base]: https://github.com/remotelearner/elis.base/tree/MOODLE_25_STABLE
190+
[elis_repo_branch_cm]: https://github.com/remotelearner/elis.cm/tree/MOODLE_25_STABLE
191+
[elis_repo_branch_alfresco]: https://github.com/remotelearner/elis.alfresco/tree/MOODLE_25_STABLE
192+
[elis_repo_branch_reporting]: https://github.com/remotelearner/moodle-block_php_report/tree/MOODLE_25_STABLE
193+
[zipdl_elis_base]: https://github.com/remotelearner/elis.base/zipball/MOODLE_25_STABLE
194+
[zipdl_elis_cm]: https://github.com/remotelearner/elis.cm/zipball/MOODLE_25_STABLE
195+
[zipdl_elis_reporting]: https://github.com/remotelearner/moodle-block_php_report/zipball/MOODLE_25_STABLE
196+
[zipdl_elis_alfresco]: https://github.com/remotelearner/elis.alfresco/zipball/MOODLE_25_STABLE
197+
[zipdl_auth_openid]: https://github.com/remotelearner/moodle-auth_openid/zipball/MOODLE_25_STABLE
198+
[zipdl_block_openid]: https://github.com/remotelearner/moodle-block_openid/zipball/MOODLE_25_STABLE
199+

adminlib.php

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<?php
2+
/**
3+
* ELIS(TM): Enterprise Learning Intelligence Suite
4+
* Copyright (C) 2008-2013 Remote-Learner.net Inc (http://www.remote-learner.net)
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* @package block_rlip
20+
* @subpackage rlip
21+
* @author Remote-Learner.net Inc
22+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
23+
* @copyright (C) 2008-2013 Remote Learner.net Inc http://www.remote-learner.net
24+
*
25+
*/
26+
27+
defined('MOODLE_INTERNAL') || die();
28+
29+
/**
30+
* custom class that handles the versioning structure for RLIP file plugins
31+
*/
32+
class plugininfo_rlipfile extends plugininfo_base {
33+
34+
/**
35+
* Gathers and returns the information about all plugins of the given type
36+
*
37+
* @param string $type the name of the plugintype, eg. mod, auth or workshopform
38+
* @param string $typerootdir full path to the location of the plugin dir
39+
* @param string $typeclass the name of the actually called class
40+
* @return array of plugintype classes, indexed by the plugin name
41+
*/
42+
static function get_plugins($plugintype, $plugintyperootdir, $plugintypeclass) {
43+
global $CFG, $DB;
44+
45+
// track our method result
46+
$result = array();
47+
if (!$DB->get_manager()->table_exists('config_plugins')) {
48+
return $result;
49+
}
50+
51+
// obtain the list of all file plugins
52+
$fileplugins = get_plugin_list('rlipfile');
53+
54+
foreach ($fileplugins as $pluginname => $pluginpath) {
55+
if ($pluginname == 'phpunit') {
56+
// phpunit directory is a false-positive
57+
continue;
58+
}
59+
60+
// set up the main plugin information
61+
$instance = new $plugintypeclass();
62+
$instance->type = $plugintype;
63+
$instance->typerootdir = $plugintyperootdir;
64+
$instance->name = 'rlipfile_'.$pluginname;
65+
$instance->rootdir = $pluginpath;
66+
$instance->displayname = get_string('pluginname', $instance->name);
67+
68+
// track the current database version
69+
$versiondb = get_config($instance->name, 'version');
70+
$instance->versiondb = ($versiondb !== false) ? $versiondb : NULL;
71+
72+
// track the proposed new version
73+
$plugin = new stdClass;
74+
include("{$instance->rootdir}/version.php");
75+
$instance->versiondisk = $plugin->version;
76+
$instance->init_is_standard(); //is this really needed?
77+
78+
// append to results
79+
$result[$instance->name] = $instance;
80+
}
81+
82+
return $result;
83+
}
84+
}
85+
86+
/**
87+
* custom class that handles the versioning structure for RLIP import plugins
88+
*/
89+
class plugininfo_rlipimport extends plugininfo_base {
90+
91+
/**
92+
* Gathers and returns the information about all plugins of the given type
93+
*
94+
* @param string $type the name of the plugintype, eg. mod, auth or workshopform
95+
* @param string $typerootdir full path to the location of the plugin dir
96+
* @param string $typeclass the name of the actually called class
97+
* @return array of plugintype classes, indexed by the plugin name
98+
*/
99+
static function get_plugins($plugintype, $plugintyperootdir, $plugintypeclass) {
100+
global $CFG, $DB;
101+
102+
// track our method result
103+
$result = array();
104+
if (!$DB->get_manager()->table_exists('config_plugins')) {
105+
return $result;
106+
}
107+
108+
// obtain the list of all file plugins
109+
$fileplugins = get_plugin_list('rlipimport');
110+
111+
foreach ($fileplugins as $pluginname => $pluginpath) {
112+
// error_log("rlipimport::subplugin: {$pluginname}");
113+
if (!file_exists("{$pluginpath}/version.php")) {
114+
// test/sample directories false-positive
115+
continue;
116+
}
117+
118+
// set up the main plugin information
119+
$instance = new $plugintypeclass();
120+
$instance->type = $plugintype;
121+
$instance->typerootdir = $plugintyperootdir;
122+
$instance->name = 'rlipimport_'.$pluginname;
123+
$instance->rootdir = $pluginpath;
124+
$instance->displayname = get_string('pluginname', $instance->name);
125+
126+
// track the current database version
127+
$versiondb = get_config($instance->name, 'version');
128+
$instance->versiondb = ($versiondb !== false) ? $versiondb : NULL;
129+
130+
// track the proposed new version
131+
$plugin = new stdClass;
132+
include("{$instance->rootdir}/version.php");
133+
$instance->versiondisk = $plugin->version;
134+
$instance->init_is_standard(); //is this really needed?
135+
136+
// append to results
137+
$result[$instance->name] = $instance;
138+
}
139+
140+
return $result;
141+
}
142+
}
143+

0 commit comments

Comments
 (0)