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: bulk book users to sessions via csv file #151

Merged
merged 4 commits into from
May 10, 2024

Conversation

keevan
Copy link
Contributor

@keevan keevan commented May 1, 2024

Summary:

  • permission check to only allow users with this permission to do so
  • can intially set notification type, status (booked/cancelled) and
    discount code.
  • tests for various scenarios.
  • managed via a booking manager class.
  • supports both csv file and array (list of bookings) formats.

Resolves #150

TODO:

  • add event handling(?)

@keevan keevan force-pushed the 150-upload-bookings branch from 2c707ae to 6133927 Compare May 2, 2024 05:03
@keevan
Copy link
Contributor Author

keevan commented May 2, 2024

Pulled in some changes found in 403, goal is that the behat issues have already been resolved.

@keevan keevan force-pushed the 150-upload-bookings branch 2 times, most recently from afd28d4 to e1bb6c1 Compare May 2, 2024 06:32
upload.php Outdated Show resolved Hide resolved
upload.php Outdated Show resolved Hide resolved
upload.php Outdated Show resolved Hide resolved
upload.php Outdated Show resolved Hide resolved
@keevan keevan force-pushed the 150-upload-bookings branch from 3547627 to 25c1397 Compare May 3, 2024 04:48
@danmarsden
Copy link
Member

I'm a bit confused here - is this a new feature? - or just a backport?

new features should land in the latest branch first - then we can deal with the backports?

@keevan
Copy link
Contributor Author

keevan commented May 9, 2024

I'm a bit confused here - is this a new feature? - or just a backport?

new features should land in the latest branch first - then we can deal with the backports?

Good catch, I'll re-target the latest branch and create a backport PR once it's merged. Thanks Dan.

@keevan keevan force-pushed the 150-upload-bookings branch from 25c1397 to 1bfb5db Compare May 9, 2024 05:22
@keevan keevan changed the base branch from MOODLE_400_STABLE to MOODLE_403_STABLE May 9, 2024 05:31
@keevan keevan requested a review from Peterburnett May 9, 2024 05:33
Copy link
Contributor

@Peterburnett Peterburnett left a comment

Choose a reason for hiding this comment

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

I've largely reviewed the major commit, rather than the CI changes, but this one is looking good to go.

@Peterburnett
Copy link
Contributor

@danmarsden I've approved this one, its fairly self contained, did you have anything you wanted to mention before merge?

@danmarsden
Copy link
Member

if you've reviewed the full patch...and hard-coded english lang strings are fixed like this one I spotted:
https://github.com/catalyst/moodle-mod_facetoface/pull/151/files#diff-2359f56e8ab786049c0f9961df9bd8363b0f1e4e986972ebc692302ebc920000R119

then feel free to merge. :-)

@keevan keevan force-pushed the 150-upload-bookings branch from 1bfb5db to 8c048e2 Compare May 10, 2024 03:49
db/access.php Outdated Show resolved Hide resolved
keevan added 4 commits May 10, 2024 14:10
Summary:
- permission check to only allow users with this permission to do so
- can intially set notification type, status (booked/cancelled) and
  discount code.
- tests for various scenarios.
- managed via a booking manager class.
- supports both csv file and array (list of bookings) formats.

Resolves #150
- add missing phpdocs,
- optimise coursecontext get by caching the call to the class,
- convert moodle_url to abs path
- remove double blank lines
- remove dead code
- fix file upload handling
Issues fixed:
      4 - Expected a space after cast statement
@keevan keevan force-pushed the 150-upload-bookings branch from 8c048e2 to d3efc17 Compare May 10, 2024 04:10
@Peterburnett Peterburnett merged commit bc4ef02 into MOODLE_403_STABLE May 10, 2024
11 checks passed
@Peterburnett Peterburnett deleted the 150-upload-bookings branch May 10, 2024 04:21
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.

Be able to upload bookings (link users to a session in bulk) via csv upload
3 participants