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.
Cordial saludo Actualmente estamos presentando una inconsistencia en New Quizzes al momento de realizar la migración y posterior edición de las evaluaciones. Específicamente, al intentar modificar una pregunta y eliminar una de sus opciones de respuesta, el sistema no permite ejecutar dicha acción. Con el fin de descartar…
Our institution is setting up 9 institutional outcomes in Canvas. Several of our outcomes have multiple skill sets within the rubric. For example: Critical Reading – Skill Set A Critical Reading – Skill Set B Critical Reading – Skill Set C Our understanding is that Canvas Outcomes data reports can provide the overall/total…
I am just curiousas to why there is not a field to enter a description for an outcome at the account level? Or at least edit the rating when you attach/link an account level outcome to a rubric. When you create a new criterion for a rubric, you enter a decription for a rating, but for an account level outcome.
We use a pre- post- model to measure learning which requires student-question matching from two time periods. This requires exporting quiz data to CSV to do the analysis properly. (I can get into more detail if needed.) The New Quizzes Student Analysis CSV export has repeated blocks of ItemID then columns related to that…
Hello! A caution to my fellow Admins and support folks that Instructure updated their live-chat link (the one in the "(?) Help" menu, if you license their Support Chat service) fairly recently, but the old broken one is still online and appears as if it still functions. If someone hits the old link, after entering their…