Moodle in English

Discussions started in Moodle in English

Moodle in English -> General help Understanding OneDrive and Moodle files

by Jerry Lau -

Hello everyone.

We are on:

O/S: Ubuntu 16.04+,  Version: 3.9.4+ (2020061504.01), Release: 01.22.2021, PHP: 7.2.34-21, MySQL5.7.31

Trying to get an understanding about OneDrive.

Once we implement this, my questions are:

1. If a student/user/teacher  is connected to their oneDrive and using the file picker, they "upload" or submit their file (say 5 GB -  a video or drawing file) as an assignment or something to a course, is this file an actual file that is "pushed" to our moodle data directly and stored there or IS IT just a link to the user's OneDrive repository? If not, would it not defeat the purpose of reducing large moodledata directory space?

2. I hope it the previous where it is just a link and not an actually file stored on the moodle data folder. I think so because uploading large files is resource intensive and could time out.

3. If it is a link, what happens if the student or user has left the school, would the link still be active where the instructor can still view their file?

Ideally, we'd like to inform our instructors to backup their course files and save it to their OneDrive repository instead to save space on the moodle server.

Thank you in advance for clarifying and educating me on the 3 questions I have above.

Regards.

Dave.




Average of ratings: -

Moodle in English -> LTI and Moodle WebWorK and Moodle SSO/SSI behaviour?

by Jerry Lau -

Hello.

We have moodle 3.9.x running on ubuntu with php 7.3.x and mysql 5.7.x

Our webwork server is running the latest build

I created the webwork cours; set up the secret "password" in webwork and configured the authen_LTI.conf file in WebWork..

I created a test moodle course and added students to them.

I created the external tool to the WebWork class and when users click on that LTI LINK, it shows them the login page of their webwork course.

Shouldn't they be SSO'd in there?

thanks

Average of ratings: -

Moodle in English -> General help Improve my sql query to show which course id have multiple enrolments for users

by Jerry Lau -

Hello folks.

I am getting close.. running rhel 6.8, php 7.3.4 moodle 3.9.4 and mysql 5.7

I wrote a query to find out which courses have students (identified using their email and not via roleid) that have enrolled BOTH via "database" and "manual" method but having problems trying to find their course id.

The purpose is to delete the "database" method only IF BOTH exist. For example if course A has a student who was enrolled BOTH via DB and Manual enrolment plugin, I want to delete their "db method" and leave their "manual" intact. Again only when both occur. If not, then it skips to next record. This is in preparation to start a new and clean db enrolment method moving forward with new enrolments .

this is my sample query for now. I don't know how to get it to show on the query result the course id if I do not selectively choose one, as shown in my example:

SELECT  userid , enrolid  FROM mdl_user_enrolments WHERE enrolid IN (Select e.id FROM mdl_enrol e where (e.enrol ='database' or e.enrol='manual') and e.courseid IN (SELECT c.id FROM mdl_role_assignments ra, mdl_user u, mdl_course c, mdl_context cxt WHERE ra.userid = u.id AND ra.contextid = cxt.id AND cxt.contextlevel =50 AND cxt.instanceid = c.id AND roleid =5 AND u.email like '%@student.school.com%' and c.id ='XXXXXX'));


Note the dupes in the userid column. the enrolid contain both the enrolment id's of manual and db of course

+--------+---------+

| userid | enrolid |

+--------+---------+

| 142276 |   33442 |

| 145150 |   33442 |

| 145181 |   33442 |

| 145417 |   33442 |

| 145420 |   33442 |

| 145422 |   33442 |

| 145428 |   33442 |

| 145863 |   33442 |

| 145870 |   33442 |

| 146019 |   33442 |

| 146020 |   33442 |

| 146022 |   33442 |

| 146023 |   33442 |

| 146024 |   33442 |

| 146026 |   33442 |

| 146193 |   33442 |

| 146197 |   33442 |

| 146327 |   33442 |

| 146328 |   33442 |

| 148172 |   33442 |

| 148661 |   33442 |

| 163621 |   33442 |

| 142276 |   33477 |

| 145150 |   33477 |

| 145181 |   33477 |

| 145417 |   33477 |

| 145420 |   33477 |

| 145422 |   33477 |

| 145428 |   33477 |

| 145863 |   33477 |

| 145870 |   33477 |

| 146019 |   33477 |

| 146020 |   33477 |

| 146022 |   33477 |

| 146023 |   33477 |

| 146024 |   33477 |

| 146026 |   33477 |

| 146193 |   33477 |

| 146197 |   33477 |

| 146327 |   33477 |

| 146328 |   33477 |

| 148172 |   33477 |

| 148661 |   33477 |

+--------+---------+

43 rows in set (0.00 sec)

How can I change my query?

Thank you







Average of ratings: -

Moodle in English -> General help SQL query to find users with no roles attached to them

by Jerry Lau -

Hello folks. 

Using moodle 3.9.4 on rhel 6.8 and php 7.3 and mysql 5.7

I noticed in the participant pages of course, the students don't have any roles attached to them.

Does anyone have a query for me to test and run against our courses? I know they have a search filter that does the same but I want to find out which tables and joins are needed to find out where and why they don't have any roles.

Then i can write a script to perhaps update those to all students.

no roles in participants page/view

Thanks






Average of ratings: -

Moodle in English -> General help query to find how student enrolled many different ways and update them via sql to use 'manual' enrolment only

by Jerry Lau -

Hello folks.

We are on 3.9.4.x and I noticed in a lot of courses, we have students enrolled in more than one method!

In other words, the student was enrolld in a course via more than one enrolment method (unusual, but possible). 

see image attached.

How can I write an sql to clean this up and change all enrolment types who have either or all the courses' "database", "selfenrol" enrolment id and update it  to their course's 'manual' enrolment id?

I believe i need to loop through them but don't know which tables I need to hit and update them.

thanks!

capture multiple enrolment methods




Average of ratings: -