I am looking to add an entire class of students (i.e. graduating class of 2010) to a course that has already been created by the teacher. All of the students are already in our Moodle system, just not in this course.
I have an external SIS that has allowed me to export a list of all the students in this class in the following format:
Re: Enroll Users to an Existing Course Through a Database
Hi , if this users area already on moodle you can add to another course by simple sql statments; Here I add users , enrol users and create couses directly by SQL , I create some functions to take users from a course to another , etc.. Follow this steps :
1 - If your users are already on moodle , you need only follow informations :
field id from user : mdl_user
field id from context : mdl_context to your course;
role = 5 (student)
Then you create a simple SQL to insert these datas on mdl_role_assignments ;
If you have any more specific question ; tell me.
Ag=fter that , your users are enrolled on the other course as students;
The code doesn't look that bad, but when you edit the database directly, one slip in your SQL may ruin the entire database.
Re: Enroll Users to an Existing Course Through a Database
If I understand this correctly, I'd need to have access to the database on the server to edit the file directly. Is there a ways I can do this (add the students) without having direct access to the server?
Thanks!
Ingrid
Re: Enroll Users to an Existing Course Through a Database
Re: Enroll Users to an Existing Course Through a Database
We do something similar. We then manage our external database with the open source xataface framework - http://www.xataface.com/. With their new email module, you get a really good system.
Hope that helps?
Richard
www.coursemerchant.com
Hello Sir,
I am trying to add users and course id through sql insert query.
Please let me know, what tables i need to use to update that information.
Thanks
VD
Hi, I need to enrol users from Joomla to Moodle into specific courses for the role of teacher and student.The users are assigned roles in Joomla but I dont have idea how to map the same roles in Moodle automatically.I am using Joomdle for SSO with Joomla and Moodle.
Please help!!!
Thanks
Kindly provide this function
Hi Manuel
This is Salman. I am new to moodle. I am facing the same scenario of requirements,
I need to integrate moodle (which I have configured on MySQL) to the MSSQL Server db which already has information regarding courses, enrollments and users (learners). I need to display all those courses category wise on moddle site and take the learner onto them from moodle website. If the learner is already in MSSQL db, moodle should not allow him re register himself. Otherwise learner can register himself on moodle and he can select his course of interest. Once he select the course, his new user information and course enrollment should also be reflected into MSSQL server db.
Are you still into this business, I need you help in PHP as you have already done this type of work.
Yours response will be much appreciated.
Thanks
Hi Manuel
I am new to moodle. I am facing the same scenario of requirements,
I need to integrate moodle (which I have configured on MySQL) to the MSSQL
Server db which already has information regarding courses, enrollments
and users (learners). I need to display all those courses category wise
on moddle site and take the learner onto them from moodle website. If
the learner is already in MSSQL db, moodle should not allow him re
register himself. Otherwise learner can register himself on moodle and
he can select his course of interest. Once he select the course, his new
user information and course enrollment should also be reflected into
MSSQL server db.
Are you still into this business, I need you help in PHP as you have already done this type of work.
Yours response will be much appreciated.
Thanks
Re: Enroll Users to an Existing Course Through a Database
Hi Salman, you may want to take a look at https://docs.moodle.org/31/en/External_database_enrolment and https://docs.moodle.org/31/en/External_database_authentication
Both of those are built into Moodle and should do most if not all of what you need.
plz suggest me
Hi,
In the original problem, users already exist in Moodle so the solution proposes work well.
In your case, you should also activate the Authentication plugin named "External Database" to import your users. You might need to create an SQL view to list your users.
Regards
Re: Enroll Users to an Existing Course Through a Database
Right now we want same kind of solution. I appreciate if you can share the sql script.
Your response greatly appreciate...
Thanks
Krishna
I need the same script/help/advice from anyone that knows how to do this. As I am just starting to use Moodle...anyone have the exact steps I need to take?
Your help is much appreciated,
Steve
Re: Enroll Users to an Existing Course Through a Database
Hi! How can i display the list of course a certain student is enrolled?
please help.. Thanks
Re: Enroll Users to an Existing Course Through a Database
Click on their profile - they are all listed right there.