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

Register new open edX users #15

Open
veotani opened this issue Jul 24, 2020 · 0 comments
Open

Register new open edX users #15

veotani opened this issue Jul 24, 2020 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation frontend

Comments

@veotani
Copy link
Contributor

veotani commented Jul 24, 2020

Description
Create a page for registering edx users. It should ask user to enter edX users details. Then request is made and the status of the job is being displayed.
There may be many edX users, so make sure it's convenient for user to insert information into system. Probably it will be wise to allow user enter information and then show them preview.

Steps

  1. Create interface for user to enter edx users data. Each edX user is described with: username, email, password, first name, second name
  2. After data is being inserted show user preview on how this system parses his result (it may be table or just a list which is easy to validate with human eye)
  3. Send request
  4. Display status message (success or fail)

Request
Your goal is to send HTTP POST on http://serverurl/massregister with payload:

{
    "users": [
        {
            "username": "myuser", 
            "email": "[email protected]", 
            "password": "pwd", 
            "first_name": "firstname", 
            "second_name": "secondname"
        },
        {
            "username": "myuser2", 
            "email": "[email protected]", 
            "password": "pwd", 
            "first_name": "firstname", 
            "second_name": "secondname"
        }
    ]
}

Response
Even If only one user was created, then the status code should be 200 OK. Example of the response:

{
    "statuses": [
        {
            "username": "myuser",
            "status": "success",
            "message": ""
        },
        {
            "username": "myuser2",
            "status": "fail",
            "message": "user exists"
        },
        {
            "username": "русскиебуквы",
            "status": "fail",
            "message": "bad symbols"
        }
    ]
}

Errors
There are several errors and methods to handle them:

  1. code 401 => redirect to login page
  2. code 200 but "statuses" is empty => there are no courses for this edx user, display a message for a user
  3. code 200 but any "statuses.message" is not empty => display that users information with messages
  4. Handle any other not successful response with generic error message

Acceptance Criteria
As a user, i may enter edx user details and register them. If error occurs, user should know what went wrong. If there are no errors, then user gets message about everything being ok.

@veotani veotani added documentation Improvements or additions to documentation frontend labels Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation frontend
Projects
None yet
Development

No branches or pull requests

2 participants