Skip to content

Commit

Permalink
fix: Elimination of unnecessary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielC1409 committed Mar 4, 2025
1 parent 4575be5 commit 167a7a5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions xmodule/capa/xqueue_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import hashlib
import json
import re
import logging

import requests
Expand Down Expand Up @@ -37,25 +36,6 @@ def is_flag_active(flag_name, course_id):
return flag and flag.enabled


def get_flag_by_name(flag_name):
"""
Look for the waffle flag by name.
"""
from openedx.core.djangoapps.waffle_utils.models import WaffleFlagCourseOverrideModel
flag = WaffleFlagCourseOverrideModel.objects.filter(waffle_flag=flag_name, enabled=True).first()
return flag and flag.enabled


def get_course_id(callback_url):
"""
Extract course_id from the callback URL
"""
course_id_match = re.search(r'(course-v1:[^\/]+)', callback_url)
if not course_id_match:
raise ValueError("The callback_url does not contain the required information.")
return course_id_match.group(1)


def make_hashkey(seed):
"""
Generate a string key by hashing
Expand Down

0 comments on commit 167a7a5

Please sign in to comment.