-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbm_dload.py
44 lines (30 loc) · 1.06 KB
/
sbm_dload.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 2 09:19:29 2017
@author: ctoffer
"""
from mdc import MetaData
from moodle import Moodle
from student import StudentFilter
from folder import SubmissionFolder
if __name__ == '__main__':
md = MetaData()
sheetNr = int(input("Sheet number: "))
s = SubmissionFolder(sheetNr = sheetNr)
osubms = s.getOriginalSubmissions()
lsubms = s.getLocalSubmissions()
if osubms is None:
with Moodle(acc = md.getMoodleAcc()) as moodle:
print("Download from Moodle")
osubms = s.downloadSubsIntoOrigin(moodle)
else:
print("Local originals present")
#--------------------------------------------------------------------------
if lsubms is None:
print("Correct from Origin")
lsubms = s.correctOrigin(osubms)
else:
print("Corrected archives present")
#--------------------------------------------------------------------------
s.unpackIntoWorking(lsubms)