I inherited a course in which lectures are offered in five formats: video, audio, handout, slides, and transcript. Unfortunately, this means I don't know exactly how some elements of the course were created.
The image below shows how the links are displayed for Module 4 Lecture b.
For some reason, some of the buttons link to the wrong files. For example, the Audio, Handout, Slides, and Transcript buttons link to the content for Lecture a instead of Lecture b.
An example of the HTML code for the Audio button is:
<td style="padding-right: 1em;"><a class="btn btn-lg btn-info" href="https://bcconted.instructure.com/courses/13/modules/items/3256" target="_blank" rel="noopener noreferrer">Audio</a></td>
I believe that "3256" refers to the audio file that will be played when the button is selected.
I have tried inserting the desired file into a new Page. When I view the HTML code, the link shows
.../13/files/15888/... which is a different number and also references "/files/" and not "/modules/items/."
I have opened the module and clicked on the Audio button as a test. When I check the URL in the browser address bar, I see:
This is the correct item ID, but it seems that I'd have to launch the item by going to the module, opening the page, and clicking on the item link. Since it's the wrong item, however, I wouldn't get the item ID that I want (which isn't linked on the page).
Does anyone know where I can find the module_item_id when the item isn't linked to the page?
I hope my question isn't too confusing. I'm stumped.
This is just kind of a wild thought but since no one else has answered, maybe something is better than nothing. Have you tried right clicking and then selecting "inspect"?
When I do it on this page at the "@ Mention" button it gives me some additional information about that particular part of the page that I normally wouldn't find. It's proved useful for me in the past in working with modules through the API.
I had tried "inspect." I should have mentioned that. However, I didn't find anything that was obviously the module_item_id.
I did notice that the module_item_id numbers appear to be sequential, and the first item in the list is the correct item (i.e., the Narrated Video item is the correct item for the module). So I replaced the module_item_id numbers for the remaining items by incrementing them by 1. For example, if the Narrated Video module_item_id is 3260, I edited the Audio module_item_id to be 3261, the Handout module_item_id to be 3262, etc. This works!
However, I don't know why it works, or what I would do if I didn't have that initial item with the correct module_item_id.
After I've corrected the issue in the course, and re-verified all the other links, I'll submit a ticket to Canvas support and will post their response here.
It looks to me like those are really "pages" from Canvas, not Canvas built-in "modules" (just to be clear, so nobody is confused by the terminology). That being said, the links were more than likely created using the sidebar on the right hand side of the page. When you use the sidebar to find content, it will automatically create the correct link on the left. I don't think the id numbers are anything you're really supposed to know offhand, except possibly for API work.
I had tried that and included that in my original message when I wrote:
But I can see that my description wasn't clearly written.
I should also have mentioned that the item ID generated when I insert the file using the sidebar on the right hand side doesn't work when I add it to the hand-modified code in the original HTML. It refers to the same file, but when I save the page and click the link I get an' error message.
The solution I have works currently, and I hope to figure out the rest soon.
An even more important question now that the new RCE embraces a flat file system with no way connect files with links.
It is, in my humble opinion as a programmer and web designer for many years, to make assumptions of the internal file sequencing number, as their may be files inserted in another directory. Yikes.
However, my issue: I no longer have the ability to specify the module name (just the id, with no obvious mapping) and unable to correlate between the file name in "files" and the fileid that is linked. This is a really, really bad idea.