-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command to download all the courses the user can see #6
Comments
That would be fine, but it is very unusual to download courses in which you are not enrolled. Especially because by default you can't see the course content without registering, the admin has to change some settings to make this possible. Currently I don't have time to implement this, but you can currently try to force the downloader to download a course by modifying the following code. There, in line 90, all courses you are enrolled in are selected. You can add courses manually immediately afterwards. Like this:
Where the first parameter of Course is the id of the course, the second the name of the course and the 3rd must be an empty list. This should work as long as you have read access to the course. |
Yeah it is unusual. 😂 Thank you for the instructions! I'll have a go myself.
…________________________________
From: Daniel Vogt <notifications@github.com>
Sent: Friday, February 7, 2020 9:46:29 AM
To: C0D3D3V/Moodle_Downloader_2 <Moodle_Downloader_2@noreply.github.com>
Cc: sds100 <developer.sds100@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [C0D3D3V/Moodle_Downloader_2] command to download all the courses the user can see (#6)
That would be fine, but it is very unusual to download courses in which you are not enrolled.
Especially because by default you can't see the course content without registering, the admin has to change some settings to make this possible.
Currently I don't have time to implement this, but you can currently try to force the downloader to download a course by modifying the following code.
In this file moodle_connector/moodle_service.py
There, in line 90, all courses you are enrolled in are selected.
courses = results_handler.fetch_courses(userid)
You can add courses manually immediately afterwards.
Like this:
courses = results_handler.fetch_courses(userid)
courses.append(Course(2342, 'Ein Kurs', []))
Where the first parameter of Course is the id of the course, the second the name of the course and the 3rd must be an empty list.
This should work as long as you have read access to the course.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD36JQRLYDS2G5TR4K6VC7LRBUUXLANCNFSM4KQQROZA>.
|
You can have a look in You get a list of all courses in your moodle by calling: If there are a lot of courses on your moodle, it will not make you happy... because it takes a very long time. To filter the list, you should first ask for the catagories... and then filter by category. With the help of the |
First steps have been taken for this issue :D |
Cool! 😀 |
you can now use |
Is that okay or did you imagine it differently? |
Could you add a command to download all the courses the user can SEE and not just ones they are enrolled in since I can see other courses on my moodle, which I'm not enrolled in?
The text was updated successfully, but these errors were encountered: