Commit a233a8e8 authored by Dennis Baurichter's avatar Dennis Baurichter

Allow setting default archive folder

Introduce defaultArchiveId to config.py

See #91
parent 9cbe8cbb
......@@ -3,6 +3,9 @@ from klausurarchiv.config_base import *
## \brief See klausurarchiv/config.py#deposits
deposits=["Studierendenausweis", "Semesterticket", "Führerschein", "10 €"]
## \brief See klausurarchiv/config.py#defaultArchiveId
defaultArchiveId=None
## \brief See klausurarchiv/config.py#printPDFFile
def printPDFFile(filename,count):
# todo: implement this method, it should issue a print job on your trusty
......
......@@ -36,6 +36,15 @@ fn_config=os.path.join(
# common ones.
deposits=[]
## \brief Default archive folder
#
# Multiple folders can be marked as archive folders (see \ref
# _fn_99-meta_doc_concepts_folder-configuration_md). Use this setting to set
# the ID of the default archive folder to use (type str; \ref
# _fn_99-meta_doc_concepts_folders-and-exams_md). It will be selected by default
# when trying to archive exams.
defaultArchiveId=None
## \brief Deployment-specific method issuing a printjob of a single exam file.
#
# This method is to be overwritten by the deployment-specific configuration
......@@ -86,7 +95,8 @@ if os.path.exists(fn_config):
setattr(ThisModule,k,getattr(m,k))
# special handling for non-method variable
if "deposits" in dir(m):
setattr(ThisModule,"deposits",getattr(m,"deposits"))
# special handling for non-method variables
for var in "deposits", "defaultArchiveId":
if var in dir(m):
setattr(ThisModule,var,getattr(m,var))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment