Skip to content

Commit

Permalink
feat(Mahara tech): adding quiz detection (PreMiD#7611)
Browse files Browse the repository at this point in the history
* feat(Mahara-Tech): add presence

* feat(Mahara-Tech): add presence

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update util.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update websites/M/Mahara-Tech/metadata.json

Co-authored-by: Daniel Lau <[email protected]>
Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

* Update websites/M/Mahara-Tech/metadata.json

Co-authored-by: Daniel Lau <[email protected]>
Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

* Update presence.ts

Signed-off-by: Youssef Ayman <[email protected]>

* Update metadata.json

Signed-off-by: Youssef Ayman <[email protected]>

---------

Signed-off-by: Youssef Ayman <[email protected]>
Co-authored-by: Daniel Lau <[email protected]>
  • Loading branch information
ELJoOker2004 and theusaf authored Sep 5, 2023
1 parent 1eff5b7 commit 44d84d7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions websites/M/Mahara-Tech/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"en": "Maharatech is an online learning platform, offering high-quality courses authored by Information Technology Institute ITI"
},
"url": "maharatech.gov.eg",
"version": "1.0.1",
"version": "1.1.0",
"logo": "https://cdn.rcd.gg/PreMiD/websites/M/Mahara-Tech/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/M/Mahara-Tech/assets/thumbnail.png",
"color": "#8d1f28",
Expand Down Expand Up @@ -37,4 +37,4 @@
"value": true
}
]
}
}
25 changes: 25 additions & 0 deletions websites/M/Mahara-Tech/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,31 @@ const presence = new Presence({
],
},

{
path: /^\/mod\/quiz\/*/,

smallImageKey: () => Assets.Writing,
smallImageText: () => "taking a quiz...",

details: () => document.title,
state: () => {
return document.querySelector("h4.title.float-left").textContent;
},
buttons: () => [
{
label: "View Course",
url: (() => {
const href = document
.querySelector(
".btn.btn-primary.ccn-btn-backtocourse.float-left"
)
.getAttribute("href");
return href;
})(),
},
],
},

{
path: /^\/course\/(.*)/,

Expand Down

0 comments on commit 44d84d7

Please sign in to comment.