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: add Pearson engine client #209

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Conversation

andrey-canon
Copy link
Collaborator

@andrey-canon andrey-canon commented Jul 29, 2024

Description

This adds a new client that allows to connect with the rti service provided by this pr

https://edunext.atlassian.net/browse/FUTUREX-830

Testing instructions

  1. Add the following settings
PEARSON_ENGINE_API_CLIENT_ID = "blablba"
PEARSON_ENGINE_API_CLIENT_SECRET = "fsdfsdf"
PEARSON_ENGINE_API_URL = "http://example.com"
  1. Run into a shell
from eox_nelp.api_clients.pearson_engine import PearsonEngineApiClient
from django.contrib.auth import get_user_model

api_client = PearsonEngineApiClient()
User = get_user_model()
user = User.objects.get(id=<your id>)

api_client.import_candidate_demographics(user)
api_client.import_exam_authorization(user, "course_id")

Before

After

Additional information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.

Checklist for Merge

  • Tested in a remote environment
  • Updated documentation
  • Rebased master/main
  • Squashed commits

@github-actions github-actions bot added the test label Jul 29, 2024
@github-actions github-actions bot added the size/m m lines label label Jul 29, 2024
@andrey-canon andrey-canon force-pushed the and/add_pearson_engine_client branch from 55a505f to d3899b2 Compare July 29, 2024 18:20
@andrey-canon andrey-canon force-pushed the and/add_pearson_engine_client branch from d3899b2 to d5c6534 Compare July 29, 2024 18:26
path = "rti/api/v1/exam-authorization/"
exam_data = {
"user_data": {"username": user.username},
"exam_data": self._get_exam_data(exam_id),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that the inner key has the same name of dict. But it is only an opinion. I leave it to your consideration

@andrey-canon andrey-canon merged commit 2a32318 into master Jul 29, 2024
7 checks passed
@andrey-canon andrey-canon deleted the and/add_pearson_engine_client branch July 29, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/m m lines label test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants