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: always use force flag or enrollment allowed setting #57

Closed
wants to merge 3 commits into from

Conversation

julianramirez2
Copy link
Contributor

Description

Now, in the 'Settings' tab of the plugin, you will find a field titled 'Advanced Settings' that allows you to configure whether the program should ALWAYS use 'force' or 'enrollment allowed' in all requests.

Testing instructions

Pull the branch locally and run the 'composer install' command to install all plugin dependencies and test.

Additional information

This is how the settings look now:

image

Checklist for Merge

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

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 26, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @julianramirez2! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

⚠️ We can't start reviewing your pull request until you've submitted a signed contributor agreement or indicated your institutional affiliation. Please see the CONTRIBUTING file for more information. If you've signed an agreement in the past, you may need to re-sign. See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed. After this time, you can re-run the CLA check by adding a comment here that you have signed it. If the problem persists, you can tag the @openedx/cla-problems team in a comment on your PR for further assistance.

Copy link
Contributor

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @julianramirez2.
I think we can improve this, because the feature is that you can set the force flag and the enrollment allowed as the default behavior for the automatic functions (fulfillment and refund), but with this we are setting it always.

Another problem I found with this implementation is that changes not are reflected in the request. For example, I select to use always the enrollment allowed and in my request when I buy the item, the plugin takes into account my advanced setting, but is not in the request:
Screenshot from 2023-10-27 16-06-23
Screenshot of an enrollment request with enrollment allowed and I don't see the check marked.

The same happened if I create a new enrollment request manually. I can't have a custom behavior here.
Screenshot from 2023-10-27 16-11-17
Screenshot of a manual request without force and enrollment allowed, and the plugin is using the advanced settings.

Note: another weird behavior I found about this is that the always only works at the first call (I think it is because we are not marking the checks in the request).
Let me explain: I create a enrollment request without the check marked in the request (but in the advance settings I have marked both); when I create the object they use the always, but if I select Save and update again is not taking into account the always settings.

image
Screenshot of the same request with the same form and parameters, but different answers.

@MaferMazu
Copy link
Contributor

I will close this for now because it's not a priority, and we must implement it differently. Then, we can reopen or create another PR about this.

@MaferMazu MaferMazu closed this Nov 1, 2023
@openedx-webhooks
Copy link

@julianramirez2 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

1 similar comment
@openedx-webhooks
Copy link

@julianramirez2 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants