openequella / moodle-mod_openequella Goto Github PK
View Code? Open in Web Editor NEWMoodle module for integration with openEQUELLA
Home Page: https://openequella.github.io/moodle-mod_openEQUELLA/
License: GNU General Public License v3.0
Moodle module for integration with openEQUELLA
Home Page: https://openequella.github.io/moodle-mod_openEQUELLA/
License: GNU General Public License v3.0
Line 64 reads:
$eqeulla = equella_postprocess($equella);
It should be:
$equella = equella_postprocess($equella);
Note the EU and UE error in EQUELLA.
Thanks
The plugin indicates that it supports grading and implements some of the required functionality but not all of it. This is also raised in issue #78
Looking further into the plugin and its usage, I wonder if it should be implementing Moodle GradeAPI at all. https://docs.moodle.org/dev/Gradebook_API
The plugin is missing required equella_update_grades() function. So grade items are never built.
https://github.com/moodle/moodle/blob/master/lib/gradelib.php#L1378-L1409
This plugin IMO is more about linking to resources in Equella. The current plugin does not provide any method for assessing a student's interaction with an Equella resource or a way to grade that interaction.
I see there is some Equella LTI stuff in the https://github.com/openequella/moodle-mod_openEQUELLA/blob/master/locallib.php but I can't see how any grade data from Moodle could be sent back to Equella if no grade book items exist for Equella resource items.
Thoughts?
Kind regards,
Troy
This setting to make the background an opaque blue color:
.yui3-skin-sam .yui3-widget-mask {
background-color: #223460;
opacity: 0.9;
}
Currently overwrites the CSS for Moodle and makes all Yui3 modal pop ups have that colour background. Might be worth looking at a specific Equella ID or class or removing it and using Moodle's.
Thanks
Alex
Currently the Moodle module is still displaying the old Equella Starburst logo. It needs to be updated to match the 2018.2 oEQ logo.
Describe the bug
If Moodle integration is set up with LTI and an item summary page is selected in Moodle, openEQUELLA throws OAuth errors and prevents the selection. This also occurs during Push-to-LMS.
To Reproduce
Steps to reproduce the behavior:
Set up Moodle integration with openEQUELLA.
Create an openEQUELLA item, that contains a new line character in the description node. This could also be harvested from somewhere or populated by IMS mapping - it just needs to be an item with a new line within the description.
Open a moodle selection session and select the item summary page of this item. (Alternately, push the item summary page to LMS)
See Oauth errors occur in logs. Note that selection fails.
Expected behavior
New line characters should not cause problems whatsoever.
Screenshots and stacktrace
I did have these but I can't find them - will re-replicate tomorrow and add them to this issue.
Platform:
OpenEquella Version: 2020.2+
OS: Agnostic
Browser: Agnostic
Additional context
A workaround for this is to employ shared secret instead for the Moodle integration.
Make it configurable, or at least a percentage of the screen size if possible.
locallib.php equella_select_dialog has it hard coded to 880 x 600
Many organisations use continuous integration processes to run all tests prior to production deployment. This fails when Equella plugins are installed due to missing privacy api implementation.
it would be good if you could implement the privacy api in your plugins - more info:
https://docs.moodle.org/dev/Privacy_API
Unit testing makes it possible to refactor safely.
Describe the bug
column uuid caused schema error
To Reproduce
Steps to reproduce the behavior:
php admin/cli/check_database_schema.php
equella
* column 'uuid' has incorrect type 'X', expected 'C'
Expected behavior
root@44bc1ff7eaf7:/siteroot# php admin/cli/check_database_schema.php
Database structure is ok.
Stacktrace
n/a
Platform:
Something within the plugin is storing access denied errors within the moodledata filesdir folder but these don't appear to be referenced in the files table and are never cleaned up - they are stored using hashes like normal moodledata files, so you don't notice them unless you perform a manual audit of files stored on disk compared with the files listed in the files table.
the files are html files and contain messages like:
Access denied - Sorry you do not have access to view the page you requested, You do not have one of the required privileges: VIEW_ITEM, VIEW_ATTACHMENTS"
Error messages should not be stored like this - they should go into the temp folder or be deleted.
I haven't gone looking through the code to work out where these are being saved, just dropping this in here in case someone else has any pointers and has time to go looking.
The GitHub Pages site for the moodle module needs the following paragraphs addressed:
If you need to get the attention of the EQUELLA team send an email to [email protected].
Commercial support from EQUELLA Pearson regarding this integration requires a valid support contract.
Changes required:
Hi,
Our Equella links are not opening in a new window even though the options are now set in the Global settings page. I think there may have been changes in how popups are used in Moodle 2.4
When you view the page source the onclick event is just an empty string (onclick="") where the URL resource has it set. Looking in the course cache it is set but looks a little different to a comparable URL resource set to use popups.
Let me know if you want me to do any testing.
Thanks
Shall we convert them to unix line ending?
It's not really a issue, just asking :)
Currently we send some limited metadata to Equella when doing a drag and drop contribution, but this should be extended to include the course category and section of the file being dropped into as well as information about the user.
This metadata should also be sent to Equella during a normal selection session, so any new contributions during the session will take on the metadata.
The format of the XML sent to Equella will be:
<integration>
<lms>Moodle</lms>
<contributiontype>integration</contributiontype>
<moodle>
<course>
<idnumber>eq101</idnumber>
<id>2</id>
</course>
<section>Topic 1</section>
<category>
<name>BMS1011 S1 2017</name>
<category>
<name>S1</name>
<category>
<name>2017</name>
</category>
</category>
</category>
</moodle>
<user>
<username>admin</username>
<firstname>Admin</firstname>
<lastname>User</lastname>
</user>
<course>
<fullname>Equella 101</fullname>
<shortname>eq101</shortname>
<code>eq101</code>
</course>
</integration>
Contribution type will either be "quick" as per existing drag and drop integration, or "integration" for the standard integration experience.
The "moodle" section is for Moodle specific data, the rest of the information is LMS agnostic and could be sent from other LMS modules (E.g. Blackboard Building Block)
In the Add an activity or resource dialog, the module code for customising whether it is in Resource or Activities is causing UI glitches in 2.3. The option to choose which area it shows in should be removed for 2.3 as it has been combined into a single dialog.
Hi there!
The openEquella Resource in one of our older Moodle LMSs (3.1) has a default configuration to open openEquella resources in a new window. When you middle-click or right-click > open in new tab/window on the openEquella resource, it produces a coding error.
openEquella resource settings:
Expected behaviour (screenshot taken from a Moodle 3.5 instance):
Actual behaviour:
Coding error detected, it must be fixed by a programmer: check_browser_version is removed, please update your code to use core_useragent instead.
Troubleshooting notes
Developer debugging in the problematic Moodle (3.1) did not produce anything that indicates the cause of this issue. The More information about this error link suggested purging the site cache, but this did not resolve the issue either.
I am aware this is a really old version of Moodle. However, upgrading the LMS is out-of-the-question at this point in time. Thus far, I'm unsuccessful in locating other reports of this issue online (particularly this GitHub project and Moodle's English forums. Granted that people are inclined to open links in new tabs to maintain an easy reference to other resources in the course, is there a way to resolve this aside from telling people "don't middle-click or right-click Equella links as new tabs" or changing the display option?
hello,
when user comes from moodle course to equella we need to have the same language for example if he/she in moodle are on arabic interface and opens a course to add data from openequella we need to load openequella arabic lang packs
Hi,
I have tested completion tracking with the Equella module but it is not working as expected. Although it has been enabled in the lib.php
file, there are not the necessary changes in view.php
to set a resource as completed. Here is something similar in /mod/url/view.php
Line 29: require_once($CFG->libdir . '/completionlib.php');
Line 53: $completion = new completion_info($course);
Line 54: $completion->set_module_viewed($cm);
view.php is checking for "moodle/course:viewparticipants". The module should really define its own capabilities.
The Equella module will not install on a Moodle 3.0 site. Attempting to do so triggers the following fatal error:
Plugin mod_equella does not declare valid $plugin->component in its version.php.
Debug info: Unsupported $module syntax detected in version.php
Error code: detectedbrokenplugin
We have been receiving reports and I have experienced this as well, when resources are embedded in the page instead of open in new window, they sometimes do not show the resource and instead show the Equella login page.
I was able to make it show the screen this morning, but have been unable to get it to show again (logging out of Moodle / Equella etc and trying again).
Once they have opened a resource that uses Open in New Window, the embedded resources worked again.
This issue happened on Apple Safari browser on Windows 7, have not seen it using Firefox or heard of an issue before upgrading to 6.2QA1 and master branch a week ago.
Since I upgraded the Moodle plugin (downloaded from GitHub), it has not been working correctly, no matter what settings I plug in. I'm currently testing Moodle 2.6 with the latest plugin and pointing it at an Equella 6.2 production server using shared credentials. When I try to add a new Equella resource, I get the following search in an iframe. If I click a search result, it doesn't give me the ability to add it into Moodle. Ideas on what I'm doing wrong?
In the Equella Resource plugin config page i have the display file destination dialog option selected. But when i drag and drop an attachment into a course i dont get the option to contribute it to EQUELLA
generic classes (like XMLWrapper) should be namespaced or prefixed to avoid clashing with other code - eg mod_equella_xmlwrapper()
this looks weird:
https://github.com/equella/moodle-mod_equella/blob/master/tools/lti.php#L77
https://github.com/equella/moodle-mod_equella/blob/master/tools/lti.php#L87
presume it's there for debugging purposes? - not really ideal to print raw $_GET/$_POST data if possible.
I am trying to install Moodle module for the integration with openEquella. I followed the documentation but on opening the Moodle url http://localhost:8099/, I get a database error.
There is not much documentation about the same.
Any help would be highly appreciated.
I am running
Ubuntu 16.04
Describe the bug
Moodle teacher performing file Drag and drop onto a course page is failing with error 'No location returned' code restapinolocation
To Reproduce
Pre-requisite:
Steps to reproduce the behavior:
Expected behavior
The file is added to Equella
The file is added to Moodle
Actual behaviour
File is added to Equella
File is not added to Moodle with error 'No location returned'
Stacktrace
CURL response object:
Array(
[HTTP/2] => 201
[date] => Fri, 05 Nov 2021 00:49:31 GMT
[location] => https://obfuscatedequllaurl.co/api/item/5cc73190-7803-4338-a2c7-951894bedd64/1/
[server] => Apache/2.4.18 (Ubuntu)
[access-control-allow-methods] => POST, GET, OPTIONS, DELETE, PUT
[access-control-max-age] => 1000
[access-control-allow-headers] => x-requested-with,Content-Type,origin,authorization,accept,client-security-token,X-Authorization
[p3p] => CP="CAO PSA OUR"
[x-content-type-options] => nosniff
[x-xss-protection] => 1; mode=block
[strict-transport-security] => max-age=86400; includeSubDomains
[access-control-allow-origin] => *
[access-control-expose-headers] => Location
[set-cookie] => Array
(
[0] => JSESSIONID=3B904A731EE5A63A9E477C601EE796CE; Path=/; Secure; SameSite=None;HttpOnly;Secure;SameSite=None
[1] => ROUTEID=.1; path=/;HttpOnly;Secure;SameSite=None
)
)
Error code: restapinolocation"
Platform:
Additional context
The response is returning location with lowercase 'L'. /mod/equella/equella_rest_api.php is expecting Location with an uppercase 'L'. Approx line 795
Possible resolution
// URL is in HTTP header
$resp = $curl->getResponse();
if (empty($resp['Location']) && !empty($resp['location'])) {
$resp['Location'] = $resp['location'];
}
if (empty($resp['Location'])) {
Currently users simply download the latest master
archive (or clone) due to the lack of releases. Further, this also adds some difficulty in determining which version they're on.
As a result, let's create version 1.0 by:
should really be using config_plugins table instead of main $CFG var.
eg:
$settings->add(new admin_setting_configtext('equella_url', ecs('url.title'), ecs('url.desc'), ''));
should be
$settings->add(new admin_setting_configtext('equella/equella_url', ecs('url.title'), ecs('url.desc'), ''));
An Edalex client's moodle takes around 30 seconds to list courses using the equella_list_courses_for_user web service call (the code lives inside externallib.php)
There was an effort performed in the past to optimise this 32acf74#diff-f232daf9e853b92201e86b2262bc9aca
Part of that fix involved caching the course results. So perhaps that's no longer working?
According to eqos-1611 if you drag and drop a file and choose the option 'Auto contribute file to Equella with metadata' option, the item that is contributed to equella should use the entered name and description (see screenshot)
Currently, the name and description that gets used for the item contributed to equella is the name of the file that is drag and dropped.
There are a number of ways we could simplify the setup of the openEQUELLA Resource activity module settings page, to make it more friendly to newcomers. This could include:
Disabling/enabling the equella_lti_oauth_key and equella_lti_oauth_secret fields based on the equella_enable_lti checkbox
Simplifying some of the long-winded help text, eg. Shared Secret, LTI settings
Adding /signon.do to the end of the text entered in the equella_url field, in case the user forgot to enter it themselves
Changing the equella_action field to be a dropdown with two options, structured and selectOrAdd
Making optional fields clearer to the user, so they know the bare minimum they need to do to get an openEQUELLA/moodle integration up and running (without having to read additional documentation)
I need a help to integrate moodle with openEquella with this plugin.
I'm looking for a freelancer to help me.
my email : [email protected]
This function has been deprecated since 2.4, as we have separated 2.3 branch, now it's safe to fix this on master branch.
Missing required function equella_update_grades in lib.php
Stacktrace:
You have declared one of equella_grade_item_update and equella_update_grades but not both. This will cause broken behaviour.
• line 1401 of /lib/gradelib.php: call to debugging()
• line 1367 of /lib/gradelib.php: call to grade_update_mod_grades()
• line 1121 of /lib/gradelib.php: call to grade_grab_course_grades()
• line 2006 of /lib/enrollib.php: call to grade_recover_history_grades()
• line 207 of /enrol/cohort/locallib.php: call to enrol_plugin->enrol_user()
• line 120 of /enrol/cohort/lib.php: call to enrol_cohort_sync()
• line 96 of /enrol/editinstance.php: call to enrol_cohort_plugin->add_instance()
Platform:
Moodle version = 2019052009.00 (v3.7.9)
Plugin version = 2019050800;
To Reproduce:
Hi All,
In /mod/equella/lib.php there is the guess icon method from locallib.php in mod/url.
There were changes in 2.4 to change all the file icons, the new variable $size will need to be implemented and value of 24 be used to be in line with all the others. At the moment all the 16x16 icons are stretched to 24x24.
Also larger/clearer icon under /pix would be good too.
Thanks
When opening a link to a resource which is set to embed rather than open in new window, it only shows a page and a bit of the pdf and you are unable to scroll through the document. It will scroll the page instead and not show any more. I have also tested using two fingers to scroll but that does not work either.
can sesskey checks be added to callbackmulti.php? - looks like it's called from within Moodle so should be possible?
also would be good to do some clean_param calls on the content that comes from the json_decode before passing them directly into the database.
Description
The web service returns no courses when the parameter modifiable is set to true
To Reproduce
/webservice/rest/server.php?wstoken=<TOKEN>&moodlewsrestformat=json&wsfunction=equella_list_courses_for_user&user=<USERNAME>&archived=0&modifiable=1
Expected behavior
The result should be an array containing courses that the user is a teacher of
Actual result
No data is returned
Platform:
Additional context
Perform the same steps but replace modifiable=1
with modifiable=0
Enrolled courses are returned
Solution
externallib.php
Replace lines 262 to 273 with
if ($modifiable) {
$ctx = context_course::instance($course->id);
if (!has_capability(self::WRITE_PERMISSION, $ctx, $userobj)) {
continue;
}
}
Cause:
line 240
courses = get_user_capability_course
does not return property contextid
as required in line 264
$contextrecord->id = $course->contextid;
using context_course::instance($course->id)
instead of eq_context_course::get_from_record($contextrecord)
should be efficient as this also uses context::cache_get
.
more details:
https://moodle.org/mod/forum/discuss.php?d=323384
Short version:
grab this file:
https://github.com/moodlerooms/moodle-plugin-ci/blob/master/.travis.dist.yml
rename it as .travis.yml and put in the root of your github directory.
Go to:
https://travis-ci.org/profile/equella
Flick the switch on the moodle-mod_equella
then on every commit you make to github it will fire off a request to travis to run the tests in .travis.yml and will give you traffic lights beside each commit and generate a report.
something else you might want to change:
in .travis.yml the default file has this line:
env:
global:
MOODLE_BRANCH=MOODLE_32_STABLE
you might want to add other branches to that list (or remove 32_STABLE because it's not supported.) so you might want to change it something like:
env:
global:
MOODLE_BRANCH=MOODLE_33_STABLE
MOODLE_BRANCH=MOODLE_34_STABLE
MOODLE_BRANCH=MOODLE_35_STABLE
We have additional roles to what is standard in Moodle as well as name changes to the standard roles. The plugin in now doing a get string based on role shortname which causes errors when debugging is turned on.
Invalid get_string() identifier: 'config.group.techadmin' or component 'equella'. Perhaps you are missing $string['config.group.techadmin'] = ''; in mod/equella/lang/en/equella.php?
line 293 of /lib/classes/string_manager_standard.php: call to debugging()
line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 27 of /mod/equella/settings.php: call to get_string()
line 86 of /mod/equella/settings.php: call to ecs()
line 89 of /lib/classes/plugininfo/mod.php: call to include()
line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
line 6389 of /lib/adminlib.php: call to require()
line 6491 of /lib/adminlib.php: call to admin_get_root()
line 38 of /admin/settings.php: call to admin_write_settings()
Invalid get_string() identifier: 'config.group.contentadministrator' or component 'equella'. Perhaps you are missing $string['config.group.contentadministrator'] = ''; in mod/equella/lang/en/equella.php?
line 293 of /lib/classes/string_manager_standard.php: call to debugging()
line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 27 of /mod/equella/settings.php: call to get_string()
line 86 of /mod/equella/settings.php: call to ecs()
line 89 of /lib/classes/plugininfo/mod.php: call to include()
line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
line 6389 of /lib/adminlib.php: call to require()
line 6491 of /lib/adminlib.php: call to admin_get_root()
line 38 of /admin/settings.php: call to admin_write_settings()
Invalid get_string() identifier: 'config.group.editinglecturer' or component 'equella'. Perhaps you are missing $string['config.group.editinglecturer'] = ''; in mod/equella/lang/en/equella.php?
line 293 of /lib/classes/string_manager_standard.php: call to debugging()
line 6839 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 27 of /mod/equella/settings.php: call to get_string()
line 86 of /mod/equella/settings.php: call to ecs()
line 89 of /lib/classes/plugininfo/mod.php: call to include()
line 35 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
line 6389 of /lib/adminlib.php: call to require()
line 6491 of /lib/adminlib.php: call to admin_get_root()
line 38 of /admin/settings.php: call to admin_write_settings()
Can settings.php be changed to use variables in the string or another method so that each roles does not need to be added to the lang file.
Thanks
When the intercept files setting is enabled and set to meta the drag and drop breaks due to filesize check in the YUI javascript.
maxbytes = -1 may be due to a call to get_user_max_upload_file_size() which can return a -1 value which indicates filesize limits can be ignored for this user.
Moodle v3.7.x
Troy
When you first install the equella moodle module you automatically get redirected to configure all of the relevant options (including the Drag and drop options). It seems to always use the value you set there (which by default is ‘Dont intercept files').
So if you set that value to something else after the fact via the settings page (settings.php?section=modsettingequella )it doesn’t appear to work (regardless of the version of moodle used)
Meaning you can't drag and drop files onto a moodle course page, and choose to contribute them into openequella)
This behaviour happens in every moodle version I tried (3.4, 3.6, 3.7)
Steps to replicate:
Hi,
I'm currently trying to integrate your module with Moodle 2.7. As part of a client upgrade project here at NetSpot.
I note that there are 10 calls to the add_to_log function. This function has been deprecated in Moodle 2.7. As such it results in debugging being displayed to the user. More information is available here:
https://docs.moodle.org/dev/Migrating_logging_calls_in_plugins
Could you update the module to not use add_to_log in Moodle 2.7?
With thanks.
-Corey
The SSO connection is using the username only to identify the user
It should be possible to choose which field should be use for identification
A new setting to choose which identification should be used from user profile information
Currently users have to choose this every time that add an EQUELLA resource. A module setting to default to opening in a new window would be useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.