Title: Activity: Adding the conditions to resources
Course: Teaching with Moodle 2: Training, collaboration and reflection online > Section: Setting Restrictions and Conditional Activities

You can click here to view the learning pathway in a new window so that you can see it in context and follow the instructions below to add the conditions to your activities.

You have already created the resources shown in the image below and set the activity completion for each one. We now need to add conditions to the resources so that they do not become available until the previous one is complete.

The first activity, Introduction to colours, will not have any restricted access as it needs to be the initial trigger to start the rest of the activities.  However, the Quick Quiz about Colours cannot be viewed until Introduction to colours have been marked as complete.  Let's go and set this up!

- Go into the Quick Quiz about Colours activity on your course and then click on 'edit settings' in the settings block (probably on the left of the screen).
- Scroll towards the bottom of the screen to find the 'restrict access' section.
- In the activity completion condition area, click on the drop down list and choose the 'introduction to colours' resource (the resources are listed in alphabetical order).  In the next drop down list to the right of this resource make sure it says 'must be marked complete'.
- In the Before activity can be accessed area, choose 'show activity greyed-out, with restriction information'.
- Scroll to the bottom of the screen and click on 'save and return to course'.

You will see on the main course screen that the 'Quick Quiz about Colours' activity is now shown in grey and will state that is will be made available when the introduction to colours page has been completed.  We have already set the introduction to colours page up to be complete when it has been viewed.

Let's do the next activity.

- Go to the edit page of the More about colours URL
- Scroll towards the bottom of the screen to find the 'restrict access' section. We will use the grade conditions option here.  Choose the Quick Quiz activity in the drop down list. The grade must be least 0% and less than 50%.
- Scroll to the bottom of the screen and set the activity so that it is hidden entirely.
- Click on 'save and return to course'.  Notice that it is greyed out and states that it is hidden from student view until a grade is achieved.  In this case, it will only be made available if the student scores less than 50% in the quiz.

Next we need to activate the label to give the students the next instruction if they have used the website.

- Go into the editing page for the label and scroll down to the bottom of the screen to find the 'restrict access' section.
- Next to 'activity completion condition' choose 'More about colours' from the drop down list and make sure the condition is 'marked as complete'.
- Change 'before activity to be accessed' option to 'hide activity entirely'.
- Scroll to the bottom of the screen and click on save and return to course.

This label will only be shown IF a student gets lets than 50% of the quiz and then views the website to develop their understanding of colours.  If the student gets over 50% in the quiz they will never see the website and this label.

Finally, you now need to set the conditions for the forum.  Students can only complete this IF they have shown understanding of colours by gaining over 50% on the quiz.

- Go into the forum and click on edit settings to edit the activity.
- Scroll to the bottom of the screen and find the restrict access section.
- We will be using the grade conditions again.
- Choose the 'quick quiz about colours' activity in the drop down list.
- This time the grade must be least 50% .
- Scroll to the bottom of the screen and set the activity so that it is shown with restriction information.
- Click on 'save and return to course'.

Your learning pathway is now complete!