Skip to content

Conversation

@ShenyiCui
Copy link
Contributor

Changes

  • New Incentive Controller function calculate_totalxp()
  • New Achievement function get_total_xp()
  • Calling the API endpoint calculate_totalxp will return a value denoting the current total XP for the current user.

Testing

  • Navigate to dev.exs and provide your local database credentials
  • Open API link: Postman Testing
  • Retrieve an authorisation token
  • Set your course_id
  • Run the API call Get Total XP

Expected Result
Screenshot 2022-03-02 at 1 02 32 AM

@ShenyiCui ShenyiCui added Enhancement New feature or request _API labels Mar 1, 2022
@ShenyiCui ShenyiCui requested a review from boydanderson March 1, 2022 17:04
ShenyiCui and others added 5 commits March 9, 2022 01:20
- xp calc based on user_id
- xp calc based on goal count
- run mix format
- Inlined small functions
- Changed function naming related to calculating total xp
- Moved total_xp endpoint to user route
- Calculate total xp through a single query.
- Fix variable issues in user_controller
@ShenyiCui ShenyiCui requested a review from angelsl March 22, 2022 18:44
@coveralls
Copy link

coveralls commented Mar 23, 2022

Coverage Status

Coverage increased (+0.03%) to 96.737% when pulling 839b45f on Add-Totalxp-Calculation into d4f733f on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

_API Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants