How to create a new restriction?

How to create a new restriction?

by Heitor Silva -
Number of replies: 3

Hello guys!

I'm working on a Moodle of a company that students are obligated to see certain contents on a minimum time period. This time is saved on a database table, and needs to be a restriction to enable an exam / test.

Let's say I need to learn about Boeing 737, and I need to have at least 120 minutes of seen content. When I'm configuring a exam / test, I need to be able to define that it will only be enabled if my student has seen 120 minutes of Boeing content. In other words, exam / test will be enabled only after querying that database table e afirming that student X has 120 minutes of content Y...

Anybody knows how do I do that? How do I start a plugin / module to do that?

Best regards

Average of ratings: -
In reply to Heitor Silva

Re: How to create a new restriction?

by William Lu -
Picture of Particularly helpful Moodlers

Hi Heitor,

Moodle lesson can do this easily:

1. Create a lesson > Add a Content page, insert your movie into the page.

2. Create another lesson, set Prerequisite like below:

pre


3. Ask some questions in the second lesson to test your students and make sure that they did watch the movie (not just played the movie in a tab and playing games in another tab for 120 minutes).


HTH


William

In reply to William Lu

Re: How to create a new restriction?

by Heitor Silva -

Hello William!

Actually, what I needed is here: https://docs.moodle.org/dev/Availability_conditions

Thanks for your response though.

Best regards

Average of ratings: Useful (1)
In reply to Heitor Silva

Re: How to create a new restriction?

by Jaswinder Singh -
Picture of Testers Picture of Translators
Hi there,

AFAIK, You can use the Timestat Block for measuring the time spent by teachers and there is new feature coming in Moodle 2.9 for enabling the time spent as an activity completion, but it is available for Lesson activity only

Forum thread: https://moodle.org/mod/forum/discuss.php?d=310357

TimeStat block: https://moodle.org/plugins/view/block_timestat

Hope it helps!!
Jaswinder Singh