Skip to content
Snippets Groups Projects

Resolve "[Queue-2.0] CSV Import for TAs"

What does this mr do?

Allow teachers to upload a CSV file with "netId","role" into queue to add several students, ta's etc.

Screenshots

before

after

image Error gets displayed when there is something wrong with the CSV

Does this MR meet the acceptance criteria?

  • I have added a changelog entry to reflect the significant changes I made.
  • Tests were created to test the feature.
  • I have updated the documentation accordingly.
  • I adhere to the style guide. Closes #396 (closed)
Edited by Cédric Willekens

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • d3fec27b - Add CodeMirror and format CSV example for participants

    Compare with previous version

  • added 1 commit

    • 7d2ca12e - Add test to make sure CSV's get parsed correctly

    Compare with previous version

  • added 1 commit

    • 58a540db - Add test to make sure CSV's get parsed correctly

    Compare with previous version

  • Otto Visser requested review from @Lemaire

    requested review from @Lemaire

  • Otto Visser resolved all threads

    resolved all threads

  • Cédric Willekens resolved all threads

    resolved all threads

  • added 1 commit

    • 683724ef - Fix grammar mistake in error message.

    Compare with previous version

  • Chris Lemaire changed target branch from queue-v2.0 to development

    changed target branch from queue-v2.0 to development

  • 40 * @return A list of type T containing the objects found in the CSV.
    41 * @throws EmptyCsvException Thrown when the csv is empty.
    42 * @throws InvalidCsvException Thrown when the csv could not be parsed.
    43 */
    44 public static <T> List<T> readCsv(MultipartFile csvFile, Class<T> readerFor, CsvSchema schema)
    45 throws EmptyCsvException, InvalidCsvException {
    46 if (csvFile.isEmpty()) {
    47 throw new EmptyCsvException("Empty csv");
    48 }
    49
    50 CsvMapper mapper = new CsvMapper();
    51 try (InputStream stream = csvFile.getInputStream()) {
    52 return Lists.newArrayList(
    53 mapper.readerFor(readerFor).with(schema).readValues(stream));
    54 } catch (RuntimeJsonMappingException | IOException e) {
    55 throw new InvalidCsvException("Invalid csv: " + e.getMessage(), e);
    • I believe, in Submit, errors are accumulated and displayed together to immediately be able to resolve all issues as a teacher. It might be useful to do something like this in the future, but probably not necessary right now.

    • Please register or sign in to reply
  • Cédric Willekens added 168 commits

    added 168 commits

    • c093d0ec - Merge branch 'development' into 'master'
    • 88d92575 - Merge branch 'development' into 'master'
    • 28e3bac3 - Merge branch 'development'
    • 4212ea49 - Merge branch 'development' into 'master'
    • 5b2a6b5b - Merge branch 'development' into 'master'
    • 3da08da6 - Merge branch 'development' into 'master'
    • a2ad79a4 - Merge branch 'development' into 'master'
    • 7767799b - Merge branch 'development' into 'master'
    • cff5f578 - Merge branch 'development' into 'master'
    • db6e881b - Merge branch 'development' into 'master'
    • 3443a7be - Merge branch 'development' into 'master'
    • 43f041ef - Development
    • ac3d6e87 - Merge branch 'development' into 'master'
    • deb72f65 - Revert "Development"
    • 72127660 - Merge branch 'revert-43f041ef' into 'master'
    • 92183423 - Merge branch 'development' into 'master'
    • d20dc643 - Merge branch 'development' into 'master'
    • 0095a92c - Merge branch 'development' into 'master'
    • 62c80a90 - Merge branch 'development' into 'master'
    • 828912c4 - Merge branch 'development' into 'master'
    • 86c0efc1 - Merge branch 'development' into 'master'
    • fd7c1b69 - Merge branch 'development' into 'master'
    • ee2a6d14 - Merge branch 'development' into 'master'
    • b57f07e0 - Merge branch 'development' into 'master'
    • ef241b9c - Merge branch 'development' into 'master'
    • 5f52540b - Merge branch 'development' into 'master'
    • 024f2218 - Partially fixes #361 (closed) (part 3)
    • 8d952c25 - Waiting time for a timeslotted request is now since start of booked
    • 0813e23f - Merge branch '363-average-waiting-time-for-time-slot-labs' into 'development'
    • cfa1ef57 - Disable manual closing of labs that open enqueing in the future; there
    • 53171c02 - Merge branch 'labClosedWorkaround' into 'development'
    • 59dd68ab - Ignore all archived requests, not just revoked
    • eaa04c31 - Fix typo
    • f6c83cef - Merge branch 'examFix' into 'development'
    • 480f332f - Merge branch 'development' into '361-error-pages-with-groups-and-time-slots'
    • 45507f63 - Merge branch '361-error-pages-with-groups-and-time-slots' into 'development'
    • e7410c89 - Fix visibility forwarded events
    • 50ee8d0c - Merge branch '375-comment-on-forwarding-request-visisble-to-students' into 'development'
    • 5f44bec4 - disable performance due to dind issues
    • 9beaa71e - Merge branch 'perfFix' into 'development'
    • 608cf92d - add waiting status to prevent confusion waiting vs pending
    • 78f25444 - Allow admin to see slot overview
    • 3b41752a - Make sure manually added students get a Jitsi link too when needed
    • cac833f8 - Make some more text depending on whether you are a student or not
    • 6ce38245 - Add manual picking and show picked status
    • a6cd07d8 - Do the spotless...
    • 3e812488 - Merge branch 'waitingFix2' into 'development'
    • 845428fa - Fix pick button
    • 5bcf3bd6 - Merge branch 'fix-pick-button' into 'development'
    • 5d7c1eb5 - SSO hotfix attempt
    • 4f2844ff - remove comment and make string static
    • eccb19c3 - Merge branch 'ssoFix' into 'development'
    • c2bc15bf - Implement basic feedback viewing
    • dc830a22 - Add overview
    • 3ecf75f7 - Do the spotless
    • c3ea5a10 - - fix notification colour
    • f421edb2 - Apply suggestions
    • 7144ffbb - Merge branch 'feedbackViewing' into 'development'
    • 0cb330c0 - post mortem changelog
    • 8f4be93b - Merge branch 'changelogFix' into 'development'
    • 499101dc - Feedback is not allowed for exam labs
    • cb8c743e - Update changelog accordingly
    • d75175e7 - Do the coverage
    • 1aea561b - Merge branch 'development' into 'examFeedbackFix'
    • 9279a80e - Switch image for conversion
    • 3f96115c - Remove unneeded files
    • 07e2bba1 - Use lab's readable name for dropdown
    • cdae84ff - Merge branch 'examFeedbackFix' into 'development'
    • 26a08c57 - Merge branch '383-lab-dropdown-needs-more-context' into 'development'
    • 3fb64d32 - Apply suggestion
    • db401080 - Add rules, remove duplicate stage
    • 8baf629c - Merge branch 'CIcoverage' into 'development'
    • a7acace0 - Make sure the "to be determined" room does not get added twice to the
    • b9c478dc - Merge branch...
    • 66e25465 - - restart after deploy
    • a7e645cb - Remove old Queue java code
    • 1e0815ab - Add Labradoor and Librador to Queue
    • f6e199bf - Add login and home controllers
    • 7d85efd7 - Fill in the dashboard page with course editions
    • 45e5114b - Add back the course information pages
    • 034a4b48 - Add request view back
    • 17483575 - Annotate a number of templates and add lab view
    • fc30e417 - Add caching and add back request pages
    • f27ff15f - Add back request status timelines and events
    • 04b9847b - Add back student perspective of the lab page
    • 966c8205 - Implement assignment-types, modules and adjust
    • 92b132c3 - Add edition collection labs and connect lab to core
    • 09d62129 - Add back time slots with a twist
    • ed43cd6c - Add back push-subscriptions for push notifications
    • 05c4b000 - Add back websockets
    • fea8b1d4 - Fix the displaying of request group and events
    • 848c2f29 - Fix some minor issues with new Queue
    • eeb9f65d - Add back lab copying
    • 05e47c68 - Add back the lab status page
    • afc7734c - Fix timeslots enqueue
    • b9c8ae0b - Add some initial tests for services and model
    • 20252c07 - Add special exam lab view and split lab types
    • d65ac4a9 - Fix tests with new Exam Labs
    • 25fdffcc - Add feedback back and fix pipeline
    • 96b07d11 - Fix Labradoor dependency in build
    • 2286ee10 - Bump Librador version to 1.0.3-SNAPSHOT6
    • 34b8f60c - Add a proper GitLab CI pipeline
    • 2fb46ab9 - Fix the SASS compile step
    • fde1de97 - Change condition for AuthController bean
    • 18faa6e8 - Add null-check for half-authenticated people
    • 12579541 - Remove Javascript for adding email to usernames
    • 4399dfd5 - Bump Labradoor version to make Person Serializable
    • df2bb244 - Update the id values to be a generated value from ID
    • c883c9ee - fix
    • 239c34f7 - Add paginated Core requests and rename course
    • a4d3da21 - Add a batcher in CacheManagers
    • c65a558f - Make the Participants page function with Pages
    • eb6a848c - Change the course edition name to include course
    • cf10ed7c - Fix broken tests for EditionController
    • efdc5c35 - Fix edition course name in status page
    • 5b66ada3 - Test the HomeController
    • 86875af4 - Test RequestFilterController
    • 44c720e7 - Remove unnecessary filter params in controllers
    • af61d422 - Test HistoryController
    • 9f1fdd66 - Test RequestController
    • 83da7d5c - Adapt tests to new Lab setup
    • c600c786 - Add deploy configuration for GitLab
    • c5be1387 - Fix some High risk vulnerability alerts
    • 47f33b40 - Separate getting roles and edition details
    • 9a5294a7 - Add systemctl restart to deploy script
    • 230bd06d - Remove trailing slash for directory in deploy
    • ab9036cd - Add back missing colon
    • 0d2d1c90 - Replace all th:replace links to not be rooted
    • a73cea26 - Add a further restriction on Module fetching
    • cb29d75f - Add some work on getting Lab edit pages to work
    • 73d7f6b7 - Apply spotless on edit pages
    • cc414801 - Add a null-check for roles received in withAnyRole
    • af0f123d - Hopefully fix the requests fetching filter
    • 750636f4 - Fix lab editing with HTML changes
    • 7f4bd83e - Only show feedback iff not empty
    • d18fb6d5 - Redirect to enroll page when not enrolled
    • e0de3514 - Add test for redirect from lab page when not enrolled
    • 62425e5a - References for lab removal should point to correct url's
    • cbfff213 - Update changelog
    • 807c5316 - Prevent deleted labs from showing in the overview
    • cd4fa3ec - Add tests for new functionality
    • 0813eda7 - Prevent deleted labs from being shown
    • f725c4fc - Fix test after changing lab model
    • 7abeb482 - Resolve errors caused by labcontrollertests
    • 26eab6c4 - Revert changes made to properties files
    • 26c6b2c4 - Make requestcontroller tests class transactional
    • 6bf13e3b - Fix test in labcontroller
    • ebc18028 - Add a check for a student group to be available
    • 419c5cee - Add a getter for the underlying data field of LabView
    • dbc819c7 - Make sure data object from SlottedLabViewDTO is accessible to thymeleaf
    • d7187561 - Add changelog entry
    • 8ffa5ab4 - Make labService a spy for LabController test
    • ad0ea94f - Add button and get mapping for picking specific requests
    • c955f731 - Add test for new endpoint
    • 400963aa - Add changelog entry for picing requests
    • 8b56500a - Update functionability wrt issues raised in mr.
    • 84d26afe - Fix failing tests
    • a10844ef - Add documentation to new endpoint
    • 18007c1d - Add a startup repair service for request statuses
    • 750f22bb - Add endpoint for uploading CSV for new participants
    • 06c111f9 - Add error message incase something fails with the csv parsing
    • 04ed16da - Add jdoc to new methods
    • 2a826ff6 - Add test for error in csv
    • 3ddb3484 - Add changelog entry
    • af1450ad - Fix spotless issues
    • 2eb8a56d - Add documentation to Edition controller
    • c126f915 - Add CodeMirror and format CSV example for participants
    • fce59fb3 - Add test to make sure CSV's get parsed correctly

    Compare with previous version

  • Cédric Willekens mentioned in merge request !443 (merged)

    mentioned in merge request !443 (merged)

  • Please register or sign in to reply
    Loading