Making quizzes private - jhudsl/OTTR_Template GitHub Wiki

Table of Contents generated with DocToc

If you prefer that your quizzes and the answers remain hidden, you can use a companion OTTR_Quizzes repository to store them.

How to use these repositories:

The Leanpub repository is where quizzes are stored because it is meant to be kept private so answers are hidden.

Keep in mind that in order to keep your Leanpub and Bookdown versions of your course concurrent, you should not make chapter edits in this repository! Only quiz edits should be in your _Quizzes repository. Chapter changes should be made in your OTTR_Template course repository and the transfer-rendered_files.yml Github action should be used to copy over the changes here.

Setting up your OTTR_Quizzes Github repository

Go to the OTTR_Quizzes repository and click Use this template. You must name this repository identical to your main OTTR repository but ending in _Quizzes if you would like them to be linked. For example, the jhudsl/Documentation_and_Usability course has a corresponding quiz repository named jhudsl/Documentation_and_Usability_Quizzes.

Make sure to set your new repository to Private so your quiz answers will be hidden.

Set up branches

*These settings are the same as we used in the Bookdown repository so we will need to set them up in the same way.

Go to Settings > Branches and click Add rule. For Branch name pattern, put main.

Protect the main branch:
Then check the box that says Require pull request reviews before merging.

Make sure branches are updated:

  • Check the box that says Require status checks to pass before merging.
  • Underneath this also check the box that says Require branches to be up to date before merging.

Use automatic spell and URL checks:
After the first pull request, a couple of checks will automatically happen and then appear here in settings. Then, you can require these checks to pass before merging pull requests by returning here and selecting them - they are url_check and sp-check they will check that the urls work and that the quizzes do not have spelling errors. See the Github Actions section in the Bookdown repository for more details on these.

After setting up these new branch items, click Create and Save changes.

Linking to your OTTR_Template course Github repository

In order to link your _Quizzes and OTTR_Template course repositories (so you only have to edit material in one place), you need to name your GitHub repository with an identical name to your OTTR_Template course repository except end it in _Quizzes. So for example, if your Bookdown repository is called: Cool_Course; it's Leanpub quiz repository must be called Cool_Course_Quizzes.

The GitHub actions that are responsible for content transfer is in the .gihub/workflows/ folder and called transfer-rendered-files.yml

Once build-all is run, the docs/ folder where the rendered files are place are copied over to the Leanpub repository and filed as a pull request. When you are sure that you want the changes from your main OTTR_Template repository, you can merge that pull request.

Note if you haven't set a GH_PAT git secret and you are not a part of jhudsl organization, you will need to set that by following these instructions.

_Note that any content changes to non-quiz material needs to be done your course's Bookdown repository! Do NOT change them in your Quizzes repository, otherwise your OTTR_Template course will not be updated.