Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass course key as query param to taxonomy skills api #33

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Unreleased
**********


[0.1.9] - 2024-03-20
************************************************

Changed
=======

* Pass course key as query param to taxonomy skills api


[0.1.8] - 2024-03-14
************************************************

Expand Down
2 changes: 1 addition & 1 deletion skill_tagging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Django app plugin for fetching and verifying tags for xblock skills.
"""

__version__ = '0.1.8'
__version__ = '0.1.9'

# pylint: disable=invalid-name
default_app_config = 'skill_tagging.apps.SkillTaggingConfig'
5 changes: 5 additions & 0 deletions skill_tagging/skill_tagging_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,19 @@ def fetch_skill_tags(self):
user = user_service.get_user_by_anonymous_id()
api_client = get_api_client(user=user)

course_key_str = str(self.scope_ids.usage_id.context_key)
usage_id_str = str(self.scope_ids.usage_id)
LOGGER.info(
f"[XBLOCK_SKILL_TAGGING] Fetching Skills. XBlock: [{usage_id_str}], Course: [{course_key_str}]."
)
XBLOCK_SKILL_TAGS_API = urljoin(
settings.TAXONOMY_API_BASE_URL,
'/taxonomy/api/v1/xblocks/'
)
response = api_client.get(
XBLOCK_SKILL_TAGS_API,
params={
"course_key": course_key_str,
"usage_key": usage_id_str,
"page_size": PAGE_SIZE,
"verified": False,
Expand Down
1 change: 0 additions & 1 deletion skill_tagging/static/tags_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<h1>{% translate "What did you learn?" %}</h1>
<p>
{% if block_type == 'vertical' %}
{% translate "Congratulations, you've reached the end of this unit!" %}<br>
{% translate "Help future students by selecting the skills or subjects you learned from this unit." %}
{% elif block_type == 'video' %}
{% translate "Help future students by selecting the skills or subjects you learned from this video." %}
Expand Down
Loading