How do you enable timed exams in Tutor Nutmeg

I have a running instance of Nutmeg in an Ubuntu VirtualBox guest and it seems to run fine.

I imported a course with timed exams and created a new course and set Enable Timed Tests to
true in the Advanced tab in Studio

But the Timed menu on the relevant subsection does not appear. Usually one would set the
value of

FEATURES:
ENABLE_SPECIAL_EXAMS to true

in the cms.yml and lms.yml files on older non-tutor instances of OpenEdx

So on my instance of Nutmeg on tutor (installed with pip install “tutor[full]”) this
feature does not seem to be enabled.

How do I set it to true??? Where is it??

Is it in some docker container for which I have to write a plugin to change it or is
there some way using a tutor local command to get it enabled?

Just in case it is of interest: I think I figured out how to do this.

I edited the

/home/vera/.local/share/tutor/env/apps/openedx/config/cms.env.yml
/home/vera/.local/share/tutor/env/apps/openedx/config/lms.env.yml

files and just added ENABLE_SPECIAL_EXAMS: true
to both files in the FEATURES: section
and restarted everything (tutor local stop and then tutor local start).
Then the missing menus appeared.

I have not found any clear description that this is possible on the web.
Is there a way to do this with a tutor command instead of editing a file?

Hi @Hal_Riggs. Yes. :slight_smile: The approach is to use Tutor’s plugin system instead of modifying the configs directly. Your changes will likely revert back the next time you run quickstart, such as when you upgrade.

The plugin would look like this:

from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
    (
        "common-env-features",
        """
"ENABLE_SPECIAL_EXAMS": true
"""
    )
)

Here is how you would enable it:

mkdir -p "$(tutor plugins printroot)"
touch "$(tutor plugins printroot)/timed_exam.py"

# Add the contents, list and then enable
tutor plugins list
tutor plugins enable timed_exam

# Re-generate the environment
tutor config save

# Restart to apply the changes
tutor local stop && tutor local start -d

Reference sites:
https://docs.tutor.overhang.io/tutorials/plugin.html

https://docs.tutor.overhang.io/plugins/examples.html

1 Like