Questionnaire displays activity name without applying multi-language filter in the intro page (mod/questionnaire/view.php?id=) using Questionnaire version 2017050101.
Category: LMS
Back on the road of blogging again.
So our client who is a big European organization has Microsoft Azure Cloud services and having consultant company for support.
Since we would like to run Moodle we need PHP + MySQL. We got an Ubuntu app server. Funny isn’t is to run Linux machines in the Microsoft Cloud? But I am sure they are performing better than the Windows Servers. For taking advance of the Cloud service we have been offered to use the Microsoft Azure Database for MySQL Basic solution with 50 DTU. We have been told to use SSL connection.
The problem was that there is no man on Earth who could establish an SSL connection to Microsoft Azure Database for MySQL with PHP.
Even Microsoft’s documentation how to connect MySQL with PHP is without using SSL.
Our other problem was that it was so slow that we gave up using it. A 1MB MySQL dump export took 5 minutes. In a localhost it took few seconds.
We had got the following response from the Microsoft consultant:
“We took the smallest instance possible to start with, so you can expect bad performances.”
This is not a bad performance, this is unusable.
Hope to have a better MySQL service later. Come on MS!
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
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/
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
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)
Uncaught ReferenceError: MathJax is not defined
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.
My boss wanted a report to show who had submitted a certification of their debit by courses. We have approximately 120 courses. All courses have a consultant with teacher role. All the student are in separate cohorts. Each cohorts added one-by-one to courses so one cohort to one course. Consultants need to know who paid or who not. So I have made a separate course with a single assignment where students upload their certifications. In each course I have to made configurable report where the consultants see only their students upload status.
So the SQL is:
SELECT u.lastname Lastname, u.firstname Firstname, u.username Username, u.email Email, ch.name Cohortname, s.status SubmissionStatus, concat('<a target="_blank" href="%%WWWROOT%%/pluginfile.php/Submission-id/assignsubmission_file/submission_files/',f.itemid,'/',f.filename,'?forcedownload=1">',f.filename,'</a>') Download, FROM_UNIXTIME(f.timecreated) SubmissionDate FROM prefix_user AS u JOIN prefix_cohort_members AS cm ON cm.userid = u.id JOIN prefix_cohort AS ch ON ch.id = cm.cohortid and ch.idnumber = 'Cohort-id' JOIN prefix_role_assignments AS ra ON ra.userid=u.id and ra.contextid in (SELECT co.id from prefix_context co WHERE co.contextlevel = 50 and instanceid in ( SELECT id from prefix_course where id = Course-id) ) AND ra.roleid=5 LEFT JOIN prefix_assign_submission AS s on u.id = s.userid AND s.assignment = (SELECT instance FROM prefix_course_modules WHERE course=Course-id and id=Assignment-id) LEFT JOIN prefix_assignsubmission_file AS asf ON s.id = asf.submission AND s.assignment = asf.assignment left join prefix_files f ON f.itemid = asf.submission AND f.filesize > 0 LEFT JOIN prefix_files_reference r ON f.referencefileid = r.id ORDER BY ch.name, u.lastname, u.firstname
And finally all the consultants are satisfied.
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.
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.
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.