Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
/ lms2discord Public archive

Scrap moodle LMS, notify in discord using webhooks

License

Notifications You must be signed in to change notification settings

chxru/lms2discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LMS-2-Discord

Notify for new items in moodle based lms

Important: MLab is migrating to Mongodb atlast from december 2020. I've no intend to update the code to new database service. Check tinydb branch for working script with local database

For some reasons the LMS used in my university not exposing api for students. So I had to scrap everything and compare them manually to get data about newly added content. Script runs once per an hour. So notifications isn't real time Script is currently hosted in heroku.

Master branch saves data in mlab (due to data presistance issue in heroku which is I am too lazy to solve). If you prefer local storage, check tinydb branch.

Hosting this script in heroku

  1. Clone or fork this repo
  2. Update the courses list with your own courses
    To find the id, go to lms then click on a course module. ID will be displayed at the end of the URL
    eg: lms.com/course/view.php?id=[courseIDhere]
  3. If you forked this repo before, commit the changes
  4. Goto heroku and create a new app
  5. Goto deploy tab and choose 'heroku git' if you clone the repo, or 'github' if you forked the repo
  6. Follow the instruction given by heroku
  7. After deploying app set below enviromental variables

Enviromental variables

Add these variables in Heroku settings -> Config vars

Variable Value
lms-username moodle(lms) username
lms-password moodle(lms) password
webhookURL discord notification channel webhook url
logginURL heroku log output channel webhook url
dbUser mlab.com database username
dbPassword mlab.com database password

About

Scrap moodle LMS, notify in discord using webhooks

Topics

Resources

License

Stars

Watchers

Forks

Languages