Nobius Configuration¶
Nobius uses a single JSON config file with named profiles. The checked-in nobius.json at the repo root is the default config for this repo.
Location¶
By default, the tools load:
nobius.json
from the root of the Nobius repository.
You can override that with --config.
Structure¶
{
"default_profile": "exam",
"html_preview_profile": "html_preview",
"profiles": {
"problem_set": {
"render": {
"theme_location": "/themes/...",
"scripts_location": "__BASE_URI__Scripts/QuestionJavaScript.txt"
},
"pdf": {
"heading": "problem_sets"
}
},
"exam": {
"render": {
"theme_location": "/themes/...",
"scripts_location": "__BASE_URI__Scripts/QuestionJavaScript.txt"
},
"pdf": {
"heading": "problem_sets"
}
},
"html_preview": {
"render": {
"theme_location": "/themes/test-theme",
"scripts_location": "/web/test/scripts.js"
},
"pdf": {
"heading": "generic"
}
}
},
"import": {
"strip_uids": false,
"media_strategy": "copy"
},
"pdf": {
"headings": {
"problem_sets": {
"footer_label": "Set \\#",
"section_label": "MECH50010 Problem Set \\#"
}
}
}
}
Key Ideas¶
default_profile: profile used by default forexport_mobius.pyandexport_pdf.pyhtml_preview_profile: profile used by default forpreview_html.pyprofiles.<name>.render: Mobius theme and shared script URIsprofiles.<name>.pdf.heading: PDF heading scheme for that profilepdf.headings: reusable heading definitions shared across profilesimport: importer defaults shared across profiles
Within each pdf.headings.<name> block:
footer_labelcontrols the footer label textsection_labelcontrols the numbered section heading prefix
CLI usage¶
Examples:
python export_mobius.py SHEET_DIR
python export_mobius.py SHEET_DIR --profile problem_set
python export_mobius.py SHEET_DIR --render-mode exercise
python preview_html.py SHEET_DIR
python preview_html.py SHEET_DIR --profile exam
python export_pdf.py --sheet-path SHEET_DIR --profile exam
python import_mobius.py EXPORT.zip
export_mobius.py and preview_html.py separate:
--profile: which resource/deployment profile to use--render-mode: which manifest shape to render (assignmentorexercise)
export_pdf.py uses the selected profile's pdf.heading. There is no second heading selector.
Discovering render paths¶
These values are usually only obvious after the resources already exist in Mobius.
DigitalEd documents:
- theme creation and application in the Content Repository: https://www.digitaled.com/support/help/admin/Content/INST-CONTENT-REPO/Themes.htm
- content export as a
.zippackage: https://www.digitaled.com/support/help/admin/Content/INST-CONTENT-REPO/ACTIONS/Export-content.htm
Those docs do not explicitly document the internal /themes/... and QuestionJavaScript.txt URIs written into exported XML. The workflow below is therefore based on inspecting real exported Mobius packages.
Use this workflow:
- Upload or create the shared resources in Mobius.
- Apply the theme to at least one question or assignment.
- Export that content as a ZIP package.
- Open the ZIP and inspect
manifest.xml. - Search for:
/themes/.../web/.../QuestionJavaScript.txt- or
__BASE_URI__Scripts/QuestionJavaScript.txt - Copy those values into the relevant
profiles.<name>.renderblock.
In this repository, the real exported ZIPs in tmp/ all used:
{
"theme_location": "/themes/b06b01fb-1810-4bde-bc67-60630d13a866",
"scripts_location": "__BASE_URI__Scripts/QuestionJavaScript.txt"
}