I have over 150 links that were returned as broken links via the link validator. I'd like to export the listing into a spreadsheet so that I can track what was fixed.
Is there an option in exporting the list rather than me copying/paste in a spreadsheet or document?
@MarandaMiller
What I normally do is work my way through the list and then re-run the validator after I have fixed a bunch of stuff. Since you can click on the title, I normally go through and ctrl-click several of those to open in a new tab and then I close the tab once I've made the changes. Most people will find it easier to work this way than to work from a spreadsheet, especially since those 150 broken links could be across just 10 pages and you'll fix all the items on one page at a time. It goes faster than you might think when seeing the initial 150 warnings.
That said, if you really want a list in a spreadsheet, you can scrape the web page and extract the links.
I quickly threw something together that would generate a tab-separated list of all of the information from the link validator. You can then copy/paste it into a spreadsheet. It wouldn't take much to make a userscript out of this that actually creates a spreadsheet, but I don't have the time to fully debug or support it right now and I haven't seen a lot of demand for something like this.
The script gives you columns for the item (page, assignment, etc.) title, the link to the Canvas item, the type of item, the message, the link that is problematic, and the text of the link. It handles the cases where items have multiple types of messages (thanks go to one of my unnamed colleagues for having a page with 25 broken links).
These directions are for Chrome, but the script should work in all major browsers.
var info = [['title','url','type','message','link','linkUrl']]; document.querySelectorAll('#all-results div.result').forEach(r => { const headEl = r.querySelector('h2'); const headLink = headEl.querySelector('a'); const typeEl = headEl.parentNode.querySelector('span'); const messagesEl = r.querySelector('ul'); const title = headLink.textContent; const titleUrl = headLink.href; const type = typeEl.textContent; for (const m of messagesEl.children) { if (!m.nodeName === 'LI') { continue; } const messageFullText = m.textContent; const itemsEl = m.querySelector('ul'); const partialText = itemsEl.textContent; const messageText = messageFullText.slice(0,messageFullText.length-partialText.length); itemsEl.querySelectorAll('li a').forEach(e => { console.log(e); const link = e.href; const linkText = e.textContent; const item = [title, titleUrl, type, messageText, link, linkText]; info.push(item); }); } }); console.log(info.map(e => e.join('\t')).join('\n'));
Hey @MarandaMiller!
That is a great question! I am not aware of a way to export the results and there is nothing mentioned in the Community Guide How do I validate links in a course? that states anything about exporting the results. If anyone has some other thoughts regarding this, hopefully they will chime in.
Thank you all for this information and the code to scrape the web results.
I found an easier way that doesn't require any scripting. There is a link validation API endpoint, but it's not documented so I didn't know about it.
I think my script returns the results in a nicer format than either one of them, but you can get the results without coding or using the developer tools.
Enhance your access to articles, forums, and events—and to participate by sharing insights, engaging in discussions, and connecting with your network of edtech peers.
Error message when viewing SCORM files as Admin login: This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Code>MissingKey</Code> <Message> Missing Key-Pair-Id query parameter or cookie value </Message> </Error> When viewing as a student login the SCORM…
I have now had a few cases of students' responses in New Quizzes not being recorded. Normally, students get a connection error and can restart, but here they get new questions one at a time with no indication of a problem until they try to submit the exam and find that they can't submit it. Students are losing 20-90% of…
We assign coursework by section, and teachers enter the transfer grades on each assignment from before the student’s enrollment date. However, those grades do not satisfy the modules’ “Submit the assignment” requirements. Students still have to go back to the beginning of the school year and submit blank documents and…
A Discussion assignment needs to be able to have more than 2 due dates. A discussion is just that--a back and forth. To be an effective kind of assignment, Instructure needs to modify them so they can have 3 or more due dates. Students also need to be notified when someone posts within their group. Currently, students turn…
This is incredibly frustrating. I use a rubric with imported outcomes to grade my assignments. Each problem is mapped to an outcome, scored on a scale with 4 tiers (the upper 2 tiers granting mastery). For a few of my students—not all—grading a new assignment deletes their earned mastery on an earlier, unrelated…