April 2020
Intermediate to advanced
716 pages
18h 55m
English
In the course view, when the instructor is logged in, they will see the PUBLISH button in three states, depending on whether the course can be published or not, and whether it is already published, as shown in the following screenshot:

The states of this button will primarily depend on whether the published attribute of the course document is set to true or false, and on the length of the lessons array. The button will be added to the Course component, as shown in the following code:
mern-classroom/client/course/Course.js
{ !course.published ? (<> <Button color="secondary" variant="outlined" onClick={clickPublish}> ...Read now
Unlock full access