catalyst / moodle-tool_crawler

A moodle link crawling robot, find broken, slow and oversized links
https://moodle.org/plugins/tool_crawler
10 stars 18 forks source link

Link checking at course context #173

Open tuanngocnguyen opened 2 years ago

tuanngocnguyen commented 2 years ago

This is a MR for issue #174

Testing Instruction

Set up

Refer to readme file: https://github.com/catalyst/moodle-tool_crawler/pull/173/commits/8cf69da55434fe8c4867e5b97066898bef2d55ab#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R145

  1. Enable course mode
  2. Set listed permissions for bot accounts
    • View subjects without participation: moodle/course:view
    • View hidden subjects: moodle/course:viewhiddencourses
    • View hidden sections: moodle/course:viewhiddensections
    • View hidden book chapters: mod/book:viewhiddenchapters
    • View hidden activities: moodle/course:viewhiddenactivities
    • See hidden categoriesmoodle/category:viewhiddencategories
  3. Set your email in 'Notify course link checker to this email address '
  4. Make sure "Parallel crawling task" is enabled

Run crawling for a course

  1. Go to a course
  2. Go to course admin settings
  3. Click on "Link crawler robot",
  4. Click on 'Run checker',the job is now added to course crawling queue
  5. After few second, refresh the page, you should be able to see the progress.
  6. Once the crawling finishes, you should receive an notification email

View report

  1. Once the crawling finished on a course
  2. Go back to "Link crawler robot" page of the course > Click on "Crawled Link report"
  3. Or go to course settings > reports > Click on "Crawled Link report"
  4. The 'response' should show "working/not working" depend on http code. Links with "200" http code should be showed as "working", while those with other status should be shown as "Not working"
  5. The response column can be sorted
  6. There is brief description of http code
dmitriim commented 2 years ago

@tuanngocnguyen can you please create an issue first and describe the problem we are trying to solve with this patch. Thanks!

tuanngocnguyen commented 2 years ago

Pending task: clean up and add info to readme file