diff --git a/lms/services/moodle.py b/lms/services/moodle.py index 4a66061f6d..89cf551eb0 100644 --- a/lms/services/moodle.py +++ b/lms/services/moodle.py @@ -1,3 +1,4 @@ +import logging from enum import Enum, StrEnum from typing import Literal, NotRequired, TypedDict @@ -5,6 +6,8 @@ from lms.services.exceptions import ExternalRequestError from lms.services.http import HTTPService +LOG = logging.getLogger(__name__) + class Function(StrEnum): GET_COURSE_GROUPINGS = "core_group_get_course_groupings" @@ -139,6 +142,8 @@ def file_exists(self, file_id) -> bool: # We don't want to download the full file so we'll do a HEAD request and assume: # - JSON response, it's an error response # - Anything else, it's the file we are after + + LOG.info("Headers from Moodle file check %s", response.headers) return not response.headers["content-type"].startswith("application/json") def page(self, course_id, page_id) -> dict | None: