由 Judy Hsu 发起的话题

Hi,

I have a local dev Moodle instance which is running Moodle 2.5, but I forgot the admin password. I have access to the database which would give me the password string, I also have access to config.php (but I don't see a salt being setup in there). Is there a way that I can reverse engineering to figure out what's the original password that I was using?

I know that I can use:

$ sudo -u apache /usr/bin/php admin/cli/reset_password.php

to reset my forgotten password,

But I'm just curious to know if it's possible to find out the original password with other means. Thank you!

Also, for the password, is Moodle 3.0 still follow the same implementation? Thanks again...

Hi, thanks for trying to help out in advance!

I have done some research on "Ad-hoc contributed reports" and related moodle doc, but it doesn't seem that a lot of "outcome" related reports were discussed before.

I know that there are three outcome related DB tables in Moodle 2.7.x:
  • mdl_grade_outcomes
  • mdl_grade_outcomes_courses
  • mdl_grade_outcomes_history
We are trying to write a simple query to generate four reports:

1. Averages of Outcomes (across different semesters): For example:

thsi si a test


2. List of Outcomes:

test


3. Outcomes by Course:


and

4. Outcomes by Student


Have anyone here done similar reports before, and if so, could you please give us some tips/pointers about how to get started? Any help would be much appreciated. Thank you!

Hi, thanks in advance for your help...

We were running Moodle 2.5.x and recently upgraded to 2.7.x. For some reasons, some of our old database queries stopped working. These queries were working perfectly in 2.5.x before, using ad-hoc database query 3rd party plugin:


SELECT lo.course AS Course_ID, co.shortname AS Course_ShortName, co.fullname AS Course_FullName,r.name, COUNT(r.name) as Forum_Posts

FROM prefix_log lo

INNER JOIN prefix_course co ON (co.id = lo.course)

INNER JOIN prefix_user us ON (lo.userid = us.id)

INNER JOIN prefix_role_assignments ra ON (ra.userid = us.id)

INNER JOIN prefix_context ctxt ON (ctxt.id = ra.contextid AND

ctxt.instanceid = co.id AND ctxt.contextlevel = 50)

INNER JOIN prefix_role r ON (r.id  = ra.roleid)

WHERE lo.action LIKE '%add%' AND (lo.url LIKE '%discuss%' OR lo.url LIKE '%view%') AND FROM_UNIXTIME(lo.time) > '2015-05-03' AND FROM_UNIXTIME(lo.time) < '2015-05-09' AND (co.shortname LIKE '%15/UA%' OR co.shortname LIKE '%15/UB%' OR co.shortname LIKE '%15/SL%' ) AND lo.course <> 1 AND lo.module = 'forum'

GROUP BY Course_ID, r.name

ORDER BY co.fullname


and



SELECT lo.course AS Course_ID, co.shortname as Course_ShortName, co.fullname AS Course_FullName, us.firstname as Instructor_FirstName, us.lastname AS Instructor_LastName,  COUNT(DISTINCT(FROM_UNIXTIME(lo.time, '%Y-%m-%d'))) AS Days_Logged_In

FROM prefix_log lo

INNER JOIN prefix_course co ON (co.id = lo.course)

INNER JOIN prefix_user us ON (lo.userid = us.id)

INNER JOIN prefix_role_assignments ra ON (ra.userid = us.id)

INNER JOIN prefix_context ctxt ON (ctxt.id = ra.contextid AND ctxt.instanceid = co.id AND ctxt.contextlevel = 50)

INNER JOIN prefix_role r ON (r.id  = ra.roleid)

WHERE lo.course <> 1 AND r.name='Instructor'

AND (FROM_UNIXTIME(lo.time) > '2015-05-03' AND FROM_UNIXTIME(lo.time) < '2015-05-09') AND (co.shortname LIKE '%15/UA%' OR co.shortname LIKE '%15/UB%')

GROUP BY us.firstname, us.lastname, Course_ID, Course_ShortName, Course_FullName

ORDER BY co.fullname, co.shortname


Is there any database level changes in 2.7 that would prevent these queries to run correctly? Thanks again for your help!!!


Moodle in English -> Quiz -> Aiken format upload behavior

Judy Hsu -
Hi, thanks for helping out..

I noticed that by default when uploading Aiken formatted questions, it doesn't seem to respect the original order of questions created in the plain text file. Can anyone please confirm this? If so, is there any way that I can make sure that after upload it will still respect the original order? Thanks!

We are using Moodle 2.5.6