New arguments to pass students list
This commit is contained in:
parent
408e007912
commit
121da2bbe0
10
check.py
10
check.py
@ -17,7 +17,7 @@ SEND_TO_REALUSER = False
|
|||||||
REVIEW_BEFORE_SEND = False
|
REVIEW_BEFORE_SEND = False
|
||||||
BETA = False
|
BETA = False
|
||||||
ALTERNATE_RESOLUTIONS = False
|
ALTERNATE_RESOLUTIONS = False
|
||||||
|
STUDENTS_LISTS = ["/home/nemunaire/workspace/peret/SRS2022.csv", "/home/nemunaire/workspace/peret/GISTRE2022.csv"]
|
||||||
|
|
||||||
import archive
|
import archive
|
||||||
import envelope
|
import envelope
|
||||||
@ -48,7 +48,7 @@ def gen_checks(gpgmail, submissions_dir, check_content=False, check_submission_h
|
|||||||
else:
|
else:
|
||||||
yield (envelope.skip, [gpgmail])
|
yield (envelope.skip, [gpgmail])
|
||||||
|
|
||||||
yield (login.check, ["/home/nemunaire/workspace/peret/SRS2022.csv", "/home/nemunaire/workspace/peret/GISTRE2022.csv"])
|
yield (login.check, STUDENTS_LISTS)
|
||||||
if check_content:
|
if check_content:
|
||||||
if HARD_MAX_SUBMISSION is not None:
|
if HARD_MAX_SUBMISSION is not None:
|
||||||
yield (late.check, [HARD_MAX_SUBMISSION, SOFT_MAX_SUBMISSION])
|
yield (late.check, [HARD_MAX_SUBMISSION, SOFT_MAX_SUBMISSION])
|
||||||
@ -315,6 +315,9 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--alternate-resolutions', action="store_true",
|
parser.add_argument('--alternate-resolutions', action="store_true",
|
||||||
help="enable if you want to display alternate resolutions")
|
help="enable if you want to display alternate resolutions")
|
||||||
|
|
||||||
|
parser.add_argument('-l', '--students-list', nargs='*',
|
||||||
|
help="students list(s) to use for the check")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.refresh_keys:
|
if args.refresh_keys:
|
||||||
@ -327,6 +330,9 @@ if __name__ == '__main__':
|
|||||||
with subprocess.Popen(["date", "-d", args.hard_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f:
|
with subprocess.Popen(["date", "-d", args.hard_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f:
|
||||||
HARD_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")
|
HARD_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")
|
||||||
|
|
||||||
|
if args.students_list is not None:
|
||||||
|
STUDENTS_LISTS = args.students_list
|
||||||
|
|
||||||
ALTERNATE_RESOLUTIONS = args.alternate_resolutions
|
ALTERNATE_RESOLUTIONS = args.alternate_resolutions
|
||||||
SEND_TO_REALUSER = args.real_send
|
SEND_TO_REALUSER = args.real_send
|
||||||
REVIEW_BEFORE_SEND = args.review_before_send
|
REVIEW_BEFORE_SEND = args.review_before_send
|
||||||
|
Reference in New Issue
Block a user