From 7a47f97456054d97f4e98884b3f767783129917a Mon Sep 17 00:00:00 2001 From: Tue Herlau <tuhe@dtu.dk> Date: Fri, 7 Mar 2025 16:27:03 +0100 Subject: [PATCH] Fixes --- setup.py | 2 +- src/coursebox.egg-info/PKG-INFO | 2 +- src/coursebox/core/info.py | 2 +- src/coursebox/core/info_paths.py | 1 - src/coursebox/core/projects.py | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 9746aef..3bc1320 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setuptools.setup( name="coursebox", - version="0.1.20.9", + version="0.1.20.13", author="Tue Herlau", author_email="tuhe@dtu.dk", description="A course management system currently used at DTU", diff --git a/src/coursebox.egg-info/PKG-INFO b/src/coursebox.egg-info/PKG-INFO index 4f9cbec..35cedfb 100644 --- a/src/coursebox.egg-info/PKG-INFO +++ b/src/coursebox.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.2 Name: coursebox -Version: 0.1.20.9 +Version: 0.1.20.13 Summary: A course management system currently used at DTU Home-page: https://lab.compute.dtu.dk/tuhe/coursebox Author: Tue Herlau diff --git a/src/coursebox/core/info.py b/src/coursebox/core/info.py index 3e351d2..07dd403 100755 --- a/src/coursebox/core/info.py +++ b/src/coursebox/core/info.py @@ -471,7 +471,7 @@ def class_information(verbose=False, d['sections'] = sections # current_lecture = -2 - from datetime import timedelta + # l['date'] - datetime.timedelta(days=7) # Long before firrst. diff --git a/src/coursebox/core/info_paths.py b/src/coursebox/core/info_paths.py index 042733e..886fe72 100755 --- a/src/coursebox/core/info_paths.py +++ b/src/coursebox/core/info_paths.py @@ -18,7 +18,6 @@ def get_paths(): if layout is None: layout = {} - root_02450public = os.path.normpath(CDIR + "/../..") root_02450private = os.path.normpath( layout.get('private', root_02450public + "/../%sprivate"%num )) root_02450instructors = os.path.normpath( layout.get('instructors', root_02450private + "/../%sinstructors"%num)) diff --git a/src/coursebox/core/projects.py b/src/coursebox/core/projects.py index 65ba0d4..33f2f44 100755 --- a/src/coursebox/core/projects.py +++ b/src/coursebox/core/projects.py @@ -354,7 +354,7 @@ def search_projects(paths, sheet_number, patterns): students = [] print("> Finding student ID. Warning: The pdf file", pdf, "appers to have no text content.") else: - students = re.findall('s\d\d\d\d\d\d', pdf_parsed['content'], flags=re.IGNORECASE) + students = re.findall(r's\d\d\d\d\d\d', pdf_parsed['content'], flags=re.IGNORECASE) gps[id] += students # Collect from .tex files: @@ -365,7 +365,7 @@ def search_projects(paths, sheet_number, patterns): id = group_id_from_file(tex) tex_parsed = recursive_tex_collect(tex) tex_parsed = "\n".join([(l[:l.find("%")] if "%" in l else l) for l in tex_parsed.splitlines()]) - students = re.findall('s\d\d\d\d\d\d', tex_parsed, flags=re.IGNORECASE) + students = re.findall(r's\d\d\d\d\d\d', tex_parsed, flags=re.IGNORECASE) gps[id] += students for id, students in gps.items(): -- GitLab