-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] Link to courses on the Moodle Academy
This is part of a change to introduce standard links to courses on Moodle Academy. We create a single canonical list of courses in `/academyCourses.js`, a custom Admonition via a JSX component, and a custom page listing all academy courses relevant to Development. That component can take properties to describe: - the topic being taught - a short name for the course - possibly further information to include The list of courses in academyCourses.js has a list of the courses, with their shortname as an object key, and then relevant metadata, including: - The course full name - The course link or id - A summary to be used in a tooltip - A full description to be used in the course list page - information as to whether the course has been archived - tags - icon The academyCourses page also uses this course information to list all courses available, with further information and tags. Fixes #12
- Loading branch information
1 parent
2f239ff
commit 4c8e7b8
Showing
6 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
const courseList = { | ||
siteHome: "https://moodle.academy/", | ||
courses: { | ||
// Each course has a local name to make it easier to map within the documentation. | ||
// Please do not remove a name from the list, but instead mark it as archived. | ||
setup: { | ||
// Valid values are: | ||
// - id (int) | ||
// - name (string) | ||
// - summary (string) | ||
// - tags (string[]) | ||
// - archived (bool) | ||
id: 29, | ||
name: "Set up your Moodle Development Environment", | ||
summary: "This course is designed for PHP developers who want to start developing Moodle plugins. You will learn about the Moodle developer community and set up a Moodle development environment. This is the first course in the Developer Pathway. Subsequent courses in the the Developer Pathway will build on the knowledge gained in this course.", | ||
tags: [ | ||
"development", | ||
"basics", | ||
"setup" | ||
], | ||
archived: false | ||
}, | ||
outputEssentials: { | ||
id: 49, | ||
name: "Web Output Essentials", | ||
summary: "This course builds on the knowledge gained in the Moodle development environment course. In this course, we learn how to use Moodle's Page and Output APIs to display content in a local plugin. An introduction to localisation using language strings is also covered in this course. This is the second course in the Moodle developer pathway.", | ||
tags: [ | ||
"development", | ||
"basics", | ||
"essentials", | ||
"output", | ||
"api" | ||
], | ||
archived: false | ||
}, | ||
architecture: { | ||
id: 51, | ||
name: "Moodle's Modular Architecture and APIs", | ||
summary: "In this course we take a deeper look at Moodle's modular architecture and explore the use of common Moodle APIs. Some of the APIs covered in this course include: Navigation, Forms, Database access, Upgrade, Strings and Output APIs. Learners get hands-on practise on using these APIs in the form of developing a local plugin.\n\nThis is the third course in the Moodle Developer Basics program.", | ||
tags: [ | ||
"development", | ||
"api", | ||
"architecture" | ||
], | ||
archived: false | ||
}, | ||
pluginBasics: { | ||
id: 10, | ||
name: "Moodle Plugin Development Basics", | ||
summary: "This course teaches you essential concepts related to Moodle's modular architecture, enabling you to develop a simple demo plugin.\n\nPlease note, this course is being migrated to form a new program of short courses on Moodle Academy (called 'Moodle Developer Basics'), which will all be available at the end of April 2022. For now you may still complete the course on Learn Moodle, or you might like to start the Moodle Academy developer short courses that are being released over the coming weeks and will form this new beginner level program.", | ||
tags: [ | ||
"development", | ||
"basics", | ||
"essentials", | ||
"api", | ||
"plugins", | ||
"architecture" | ||
], | ||
archived: false | ||
} | ||
} | ||
}; | ||
|
||
module.exports = courseList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import Admonition from "@theme/Admonition"; | ||
import Link from '@docusaurus/Link'; | ||
import SchoolIcon from '@mui/icons-material/School'; | ||
import courseList from '@site/academyCourses'; | ||
import { Tooltip } from "@mui/material"; | ||
|
||
export default function AcademyLink(props) { | ||
const courseName = props.courseName; | ||
if (!courseList.courses[courseName]) { | ||
throw Error(`Unknown course ${courseName}`); | ||
} | ||
|
||
const Course = courseList.courses[courseName]; | ||
|
||
|
||
return ( | ||
<Admonition | ||
type="info" | ||
icon={ | ||
<SchoolIcon fontSize="inherit" /> | ||
} | ||
title="Learn more on Moodle Academy" | ||
> | ||
You can learn more about <strong>{ props.subject }</strong> from the <Tooltip | ||
title={ Course.summary } | ||
><Link | ||
to={ courseList.siteHome + 'course/view.php?id=' + Course.id } | ||
>{ Course.name }</Link></Tooltip> on Moodle Academy. | ||
</Admonition> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters