Skip to content

Commit 2e23371

Browse files
Small fixes to the score mode and spool exporter commits
1 parent fdc9754 commit 2e23371

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

cms/db/task.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ class Task(Base):
194194

195195
# Score mode for the task.
196196
score_mode = Column(
197-
Enum(SCORE_MODE_IOI_MAX_TOKENED_LAST, SCORE_MODE_IOI_MAX, name="score_mode"),
197+
Enum(SCORE_MODE_IOI_MAX_TOKENED_LAST, SCORE_MODE_IOI_MAX,
198+
name="score_mode"),
198199
nullable=False,
199200
default=SCORE_MODE_IOI_MAX_TOKENED_LAST)
200201

cms/grading/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636

3737
from sqlalchemy.orm import joinedload
3838

39-
from cms import LANG_C, LANG_CPP, LANG_PASCAL, LANG_PYTHON, LANG_PHP, LANG_JAVA
39+
from cms import \
40+
LANG_C, LANG_CPP, LANG_PASCAL, LANG_PYTHON, LANG_PHP, LANG_JAVA, \
41+
SCORE_MODE_IOI_MAX
4042
from cms.db import Submission
4143
from cms.grading.Sandbox import Sandbox
4244

cmscontrib/SpoolExporter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def export_submissions(self):
130130
for filename, file_ in submission.files.iteritems():
131131
self.file_cacher.get_file_to_path(
132132
file_.digest,
133-
os.path.join(submission_dir, filename.replace(".%l", "." + submission.language))
133+
os.path.join(submission_dir,
134+
filename.replace("%l", submission.language)))
134135
last_submission_dir = os.path.join(
135136
self.upload_dir, username, "%s.%s" %
136137
(task, submission.language))

cmsranking/Scoring.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def delete_submission(self, key):
219219
def update_score_mode(self, score_mode):
220220
self._score_mode = score_mode
221221

222+
222223
class ScoringStore(object):
223224
"""A manager for all instances of Scoring.
224225

0 commit comments

Comments
 (0)