Fix broken links when cs_sole_course is set #110

Manually merged
hz merged 5 commits from almonds/catsoop:main into main 2026-09-16 12:46:24 +00:00
Showing only changes of commit 0da0590848 - Show all commits

fix URLs that start with COURSE/ for local & production

almonds 2026-06-19 14:01:19 -04:00

View file

@ -312,7 +312,7 @@ def _real_url_helper(context, url):
elif url.startswith("COURSE"):
new = [str(context["cs_course"])]
floc = content_file_location(context, new + end)
new = new if sole_course is None or new[0] == sole_course else []
new = new if sole_course is None else []
if floc is not None and os.path.isfile(floc):
pre = u2 + new
else: