Categories
LMS Moodle

Moodle Questionnaire Displays Activity Name without Applying Multi-language Filter

Questionnaire displays activity name without applying multi-language filter in the intro page (mod/questionnaire/view.php?id=) using Questionnaire version 2017050101.

Categories
LMS Moodle

Moodle – .vtt Captions do not Work with Internet Explorer

Another thing that works in every other browser but does not work in Internet Explorer.

So my solution is to set the MIME type for the .vtt files. This can be done under the Site administration / Server / File types (Moodle >= 2.9). Click on “Add a new file type” button. Set Extension to vtt, set MIME type to text/vtt then click “Save changes”.

You have to re-upload your .vtt files to have the changes take effect.

Cheers.

Related link:
https://docs.moodle.org/29/en/Working_with_files#Site_administration_settings

Categories
LMS Moodle

Moodle plugin: Aardvark theme – Anchor Offset to Adjust for Fixed Header

I have using Aardvark theme for many years (thanks Shaun).

With my latest Aardvark theme deployment I had a problem that the fixed header was relative big (160 pixel) and when using hash tag links in the courses the content of the anchors was covered by the header. I needed to offset the anchors for fix this.

After digging the net I have found Chris Coyier post titled Hash Tag Links That Don’t Headbutt The Browser Window. Using the fancier clean HTML method I have added the following CSS code at the / Site administration / Appearance / Themes / Aardvark page / Custom CSS textarea:

.section:before {margin-top: -60px; height: 60px; visibility: hidden; content: " "; display: block;} /*section offset*/
.breadcrumb-button {position: relative;} /*fix for the breadcrumb button*/

Now it is under testing, but in this short time it worked well.

Related links:
https://moodle.org/plugins/view.php?plugin=theme_aardvark
https://css-tricks.com/hash-tag-links-padding/

Categories
Moodle

Another Moodle report – List of users in a course with enrolment and access info

A report was needed by my client to list participants in a course with access info, so those who did not access the course can be warned to perform the mandatory quiz before closing it.

SELECT
 u.firstname,
 u.lastname,
 u.idnumber,
 c.shortname,
 IF(ue.status = 0, 'Active', 'Suspended') as status,
 e.enrol,
 FROM_UNIXTIME(ue.timecreated, '%m/%d/%Y %h:%i:%s %p') as enrollment_date,
 IF(ue.timestart = 0, 'No End Date',FROM_UNIXTIME(ue.timestart, '%m/%d/%Y %h:%i:%s %p')) as start_enrollment_date,
 IF(ue.timeend = 0, 'No End Date',FROM_UNIXTIME(ue.timeend, '%m/%d/%Y %h:%i:%s %p')) as end_enrollment_date,
 COALESCE((
 SELECT
 FROM_UNIXTIME(la.timeaccess,'%m/%d/%Y %h:%i:%s %p')
 FROM
 mdl_user_lastaccess as la
 WHERE
 u.id = la.userid
 AND
 c.id = la.courseid
 ), 'Never Accessed') as last_access,
 COALESCE((
 SELECT
 r.name
 FROM 
 mdl_role_assignments AS ra,
 mdl_context AS ctx,
 mdl_role as r
 WHERE 
 ctx.instanceid = c.id
 AND
 ra.contextid = ctx.id
 AND
 ra.userid = u.id
 AND
 r.id = ra.roleid
 AND
 (
 e.id = ra.itemid
 OR
 ra.itemid = 0
 )
 LIMIT
 1
 ), 'No Role Assigned') as role,
 (
 SELECT
 c2.shortname
 FROM
 mdl_course as c2
 WHERE
 e.customint1 = c2.id
 ) as child_course
FROM
 mdl_user_enrolments as ue,
 mdl_enrol as e,
 mdl_course as c,
 mdl_user as u
WHERE
 ue.userid = u.id
 AND
 ue.enrolid = e.id
 AND
 e.courseid = c.id
 AND
 c.id = 4
ORDER BY
 u.lastname,
 u.firstname,
 c.startdate DESC,
 c.shortname

Thanks for James Henestofel.
https://moodle.org/mod/forum/discuss.php?d=255646

Categories
Moodle

Moodle – Filepicker not working in 2.7.1+ on HTTPS

As a request to our client we changed to HTTPS on our server for their Moodle 2.7.1+ instance. I configured the site, but after the change the file picker stopped working.

I have found that Chrome console shows the following:

Failed to load resource: the server responded with a status of 404 (Not Found) https://c328740.ssl.cf1.rackcdn.com/mathjax/2.3-latest/MathJax.js?delayStartupUntil=configured
Uncaught ReferenceError: MathJax is not defined yui_combo.php?m/1408696391/core/event/event-debug.js&m/1408696391/filter_mathjaxloader/loader/loade…:151

It was definitely true. I tried the link with HTTP and it was fine.

So my solution was to delete the equation from the Toolbar config at Site administration / Plugins / Text editors / Atto HTML editor / Atto toolbar settings.

Categories
Moodle

How to turn off HTTPS login in Moodle database

When cloning a site for testing purposes, there could be a problem with HTTPS within the testing environment. There is a fast way to turn it off in the the database:

update prefix_config set value = 0 where name = 'loginhttps';

Then you can login without HTTPS.

 

 

Categories
Moodle

How to change Moodle chat beep sound

You can change the beep sound by change the %WWWROOT%/mod/chat/beep.wav file.

You can also disable the beep by deleting this file.

Categories
Linux

Moodle BigBlueButton activity, String could not be parsed as XML, Error code: generalexceptionmessage, Firewall issue

I have recently used the BigBlueButton plugin without problem, but I had to move my Moodle to another virtual machine. And when I tried to add a new BigBlueButton activity I got a String could not be parsed as XML error.

First I checked the setting. Remember to have the Server URL with /bigbluebutton/ at the end like:

http://example.org/bigbluebutton/

If you do not have this setting you will always get this error.

But in my case the error still occured. Then I figured out that it could be a problem of my private LAN. My Servers are behind the firewall and I do not have a DNS inside the private LAN. So the packages tried to go through the firewall and the connection was broken. But the log said only this:

[Thu Feb 27 18:29:41 2014] [error] [client 192.168.1.2] Default exception handler: Exception - String could not be parsed as XML Debug: \nError code: generalexceptionmessage\n* line 282 of /mod/bigbluebuttonbn/locallib.php: Exception thrown\n* line 282 of /mod/bigbluebuttonbn/locallib.php: call to SimpleXMLElement->__construct()\n* line 258 of /mod/bigbluebuttonbn/locallib.php: call to bigbluebuttonbn_wrap_simplexml_load_file()\n* line 31 of /mod/bigbluebuttonbn/mod_form.php: call to bigbluebuttonbn_getServerVersion()\n* line 191 of /lib/formslib.php: call to mod_bigbluebuttonbn_mod_form->definition()\n* line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()\n* line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()\n, referer: http://example.org/course/view.php?id=9

So I edited the /etc/hosts files on both servers and put their names and local IPs into is.

Moodle  /etc/hosts file:

192.168.1.x    bigbluebutton.example.org

BigBlueButton  /etc/hosts file:

192.168.1.y    moodle.example.org

Then it worked again!

 

Categories
Mahara Moodle Uncategorized

MAHOODLE Payload not encryptedERROR 1:1:Payload not encrypted

When trying to export an assignment document to Mahara and we get the following error:

Payload not encryptedERROR 1:1:Payload not encryptedDebug: \nError code: failedtopingline 280 of /portfolio/mahara/lib.php: portfolio_export_exception thrown
line 57 of /portfolio/mahara/preconfig.php: call to portfolio_plugin_mahara->send_intent()\n, referer: http://moodle.appi.bme.hu/mod/assign/view.php

Most likely we are behind a firewall. If both Moodle and Mahara servers are behind the firewall simply add the inner IP address of the Mahara server to the Moodle server /etc/hosts file like this:

192.168.x.x<-->mahara.example.org

Or if you have a DNS inside the firewall, check the settings of it.