merge CLASSROOMIO-T-49: Quiz CRUD CLASSROOMIO-T-49: Validate quiz question CLASSROOMIO-T-49: Begin work on quiz preview CLASSROOMIO-T-49: Complete quiz page CLASSROOMIO-T-49: Init quiz work CLASSROOMIO-T-49: Quiz CRUD CLASSROOMIO-T-49: Validate quiz question CLASSROOMIO-T-49: Begin work on quiz preview CLASSROOMIO-T-49: Complete quiz page CLASSROOMIO-T-49: Init quiz work Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com> Merge-request: CLASSROOMIO-MR-14 Merged-by: Best Admin <digdippa@gmail.com>
28 lines
649 B
JavaScript
28 lines
649 B
JavaScript
export function toggleBodyByTheme(isDark) {
|
|
if (isDark) {
|
|
document.body.className = document.body.className.concat(' ', 'dark');
|
|
} else {
|
|
document.body.className = document.body.className.replace(' dark', '');
|
|
}
|
|
}
|
|
|
|
export function isCoursesPage(path) {
|
|
return /courses\/[a-z 0-9 -]/.test(path);
|
|
}
|
|
|
|
export function isCoursePage(path) {
|
|
return /course\/[a-z 0-9 -]/.test(path);
|
|
}
|
|
|
|
export function isOrgPage(path) {
|
|
return /org\/[a-z 0-9 -]/.test(path);
|
|
}
|
|
|
|
export function isQuizPage(path) {
|
|
return /org\/[a-z 0-9 -]+\/quiz\/[a-z 0-9 -]/.test(path);
|
|
}
|
|
|
|
export function isLMSPage(path) {
|
|
return /lms[\/a-z 0-9 -]*/.test(path);
|
|
}
|