-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(Moodle UTC): add activity #10360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| clientId: '1459651066508345394' | ||
| }) |
Check failure
Code scanning / ESLint
Require or disallow trailing commas Error
| startTimestamp | ||
| } |
Check failure
Code scanning / ESLint
Require or disallow trailing commas Error
| startTimestamp | ||
| } | ||
|
|
||
| const path = document.location.pathname; |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
| const path = document.location.pathname; | ||
|
|
||
| if (path.includes('/course/view.php')) { | ||
| const courseTitle = document.querySelector('h1')?.textContent || 'Un cours'; |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
|
|
||
| if (path.includes('/course/view.php')) { | ||
| const courseTitle = document.querySelector('h1')?.textContent || 'Un cours'; | ||
| presenceData.details = courseTitle; |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
| } else if (path === '/' || path.includes('/my/')) { | ||
| presenceData.details = 'Sur l\'accueil'; | ||
| presenceData.state = 'Choisit son prochain cours'; | ||
| } else { |
Check failure
Code scanning / ESLint
Enforce consistent brace style for blocks Error
| presenceData.details = 'Sur l\'accueil'; | ||
| presenceData.state = 'Choisit son prochain cours'; | ||
| } else { | ||
| presenceData.details = 'Navigue sur Moodle'; |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
| presenceData.state = 'Choisit son prochain cours'; | ||
| } else { | ||
| presenceData.details = 'Navigue sur Moodle'; | ||
| presenceData.state = 'UTC - Compiègne'; |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
| presenceData.state = 'UTC - Compiègne'; | ||
| } | ||
|
|
||
| presence.setActivity(presenceData); |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
| } | ||
|
|
||
| presence.setActivity(presenceData); | ||
| }); |
Check failure
Code scanning / ESLint
Require or disallow semicolons instead of ASI Error
Updated logo and thumbnail URLs in metadata.json Signed-off-by: Julien PONS <[email protected]>
Signed-off-by: Julien PONS <[email protected]>
Signed-off-by: Julien PONS <[email protected]>
Signed-off-by: Julien PONS <[email protected]>
| "description": { | ||
| "en": "Affiche l'activité sur le Moodle de l'UTC" | ||
| }, | ||
| "url": "moodle.utc.fr", |
Check failure
Code scanning / PMD
Validates that activity URLs have valid DNS records Error
| "url": "moodle.utc.fr", | ||
| "regExp": "moodle\\.utc\\.fr", | ||
| "version": "1.0.0", | ||
| "logo": "https://i.imgur.com/oMApXis.png", |
Check failure
Code scanning / PMD
Makes sure all images (logo and URLs) are exactly 512x512 pixels Error
| presence.on('UpdateData', async () => { | ||
| const presenceData: PresenceData = { | ||
| type: ActivityType.Watching, | ||
| largeImageKey: 'https://i.imgur.com/oMApXis.png', |
Check failure
Code scanning / PMD
Makes sure all images (logo and URLs) are exactly 512x512 pixels Error
|
I just updated the images to be sure there's no problem. |
Description
Acknowledgements
npm run lintFeatures
UTC (Université de Technologie de Compiègne) is a french engineering school of which I am part. Students are using the moodle platform to study, so this presence allow them to show their activity on the website.
It has a default activity, a homepage activity and an activity for every course page.
Screenshots