Skip to content
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

less files reported #1

Closed
hn-88 opened this issue Oct 27, 2022 · 7 comments
Closed

less files reported #1

hn-88 opened this issue Oct 27, 2022 · 7 comments

Comments

@hn-88
Copy link
Owner

hn-88 commented Oct 27, 2022

when relying on contextid to determine course, a lower number of files is reported in the queries
https://github.com/hn-88/ad-hoc-moodle-database-queries/blob/main/Sheet%20of%20course---wise%20number%20of%20multimedia%20aids.sql
and
https://github.com/hn-88/ad-hoc-moodle-database-queries/blob/main/Number%20of%20ppt%20mp3%20mp4%20files.sql

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

https://moodle.org/mod/forum/discuss.php?d=214037
does not seem to be correct.

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

via https://moodle.org/mod/forum/discuss.php?d=200625
"In files tables, component col is the where (course, backup, mod_folder)" - so, to find list of files, we can search files table with
contextid =962 and component ='mod_folder'

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

To get the relevant contextid, I had used the path in LMS, which was https://server.tld/pluginfile.php/962/mod_folder/content/0/Teaching%20Resources/DD_Living%20on%20the%20Streets.pptx?forcedownload=1
Todo: get it from the database

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

In context table, id=962 has instanceid=667, which is what is seen in the html,
for the div
  | id="module-667"
  | data-for="cmitem"
  | data-id="667"

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

Explanation of context table - https://moodle.org/mod/forum/discuss.php?d=202588

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

From https://docs.moodle.org/400/en/course_display
"contextlevel 70 is modules, then instanceid points to the mdl_course_modules table" so in the relevant context table entry, the instanceid points to course_modules table

@hn-88
Copy link
Owner Author

hn-88 commented Oct 27, 2022

In course_modules table, id=667, course=34 (correct), module=8 (=folder, from modules table)

hn-88 added a commit that referenced this issue Oct 27, 2022
hn-88 added a commit that referenced this issue Oct 27, 2022
@hn-88 hn-88 closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant