Like here: pluginfile.php/1518/mod_assignment/intro/
Moodle put 1518 for this. Where did 1518 come from in the database? It's different for various attachments in each assignment. I looked in mdl_role_assignments but didn't see a 1518 in there.
How do I get the contextid?
I need to replace @@PLUGINFILE@@ with the right url and if I can get the contextid I think I can do it.
EDIT: I found it in the files table but how is it related to the assignment? I mean how do I know to look for 1518 to begin with. What tables would I join with assignment to get 1518?
Thank you.