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

Validate user sessions on bulk upload when f2f type is single #187

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

rhell4
Copy link
Contributor

@rhell4 rhell4 commented Dec 2, 2024

Currently when using the bulk upload feature a user can be added to multiple sessions when the f2f signup type is set to single.

This adds validation checking on both existing signed up sessions and multiple sessions for a single user in a bulk upload.

Testing:

  • F2F activity with signup type set to single
  • 3 sessions added to the F2F
  • Single student enrolled in the course
  • Signup the student to session 1
  • Upload a CSV to bulk signup student to session 2 and 3
  • You should see the following errors
    • Student is already signed-up for this Face-to-Face activity.
    • User student has more than one session
  • Edit F2F and change the signup type to multiple
  • Try uploading the same CSV file again
  • You should see "Uploaded file has been validated and ready to be processed."
  • Click "Confirm and process"
  • You should see "Successfully processed records."
  • The student should be signed up for all 3 sessions now

classes/booking_manager.php Outdated Show resolved Hide resolved
classes/booking_manager.php Outdated Show resolved Hide resolved
classes/booking_manager.php Show resolved Hide resolved
classes/booking_manager.php Show resolved Hide resolved
classes/booking_manager.php Outdated Show resolved Hide resolved
@rhell4 rhell4 force-pushed the validate-signuptype-403 branch from 31e3a3a to 73e3d9d Compare December 3, 2024 05:10
@matthewhilton matthewhilton merged commit cacca1a into MOODLE_403_STABLE Dec 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants