Commit Graph

55 Commits

Author SHA1 Message Date
175c8933f3 Automatically submit LTI grade on each score run
With this commit, we refactor the overall score handling of CodeOcean. Previously, "Score" and "Submit" were two distinct actions, requiring users to confirm the LTI transmission of their score (after assessing their submission). This yielded many questions and was unnecessary, since LTI parameters are no longer expiring after each use. Therefore, we can now transmit the current grade on each score run with the very same LTI parameters. As a consequence, the LTI consumer gets a more detailed history of the scores, enabling further analytical insights.

For users, the previous "Submit" button got replaced with a notification that is shown as soon as the full score got reached. Then, learners can decide to "finalize" their work on the given exercise, which will initiate a redirect to a follow-up action (as defined in the RedirectBehavior). This RedirectBehavior has also been unified and simplified for better readability.

As part of this refactoring, we rephrased the notifications and UX workflow of a) the LTI transmission, b) the finalization of an exercise (measured by reaching the full score) and c) the deadline handling (on time, within grace period, too late). Those information are now separately shown, potentially resulting in multiple notifications. As a side effect, they are much better maintainable, and the LTI transmission is more decoupled from this notification handling.
2023-11-23 14:42:10 +01:00
b91a2b7ce0 Remove PairProgramming23Study and instead use LTI parameter 2023-10-22 12:07:41 +02:00
99bd46af1a Align project files with CodeHarbor
Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
2023-10-11 00:18:33 +02:00
c2995c96f0 Remove clear_lti_session_data as it is no longer needed
* no lti session data anymore included in the function
* decided not to delete the pg_id here as it is handled in create_through_lti and implement
* the function is only called once without an exercise id so the values are now directly deleted there
2023-08-24 19:32:06 +02:00
e3603758ef Refactor LTI parameters and add study group
* This change also requires that submissions in our test need to have a valid study group.
2023-08-24 19:32:06 +02:00
e2baa2ee55 Send score for all members of a programming group 2023-08-24 19:32:06 +02:00
319c3ab3b4 Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
2023-08-24 19:32:06 +02:00
0234414bae Rename user to contributor in submission 2023-08-24 19:32:06 +02:00
97138288f4 Delete unused LTI params from session 2023-08-24 19:32:06 +02:00
939b31967f Reduce SQL queries for score runs
Fixes CODEOCEAN-JR
2023-03-14 13:56:23 +01:00
9977e1614b Allow external redirect for render host and LTI
We only use the `launch_presentation_return_url` provided to the @provider, in order to prevent using an open redirect.
2022-12-05 22:38:13 +01:00
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
006c794f54 Fix rubocop offenses 2022-09-14 00:31:47 +02:00
22cd202e9d Refactor reject_illegal_file_attributes check
* Improve readability of method
* Add a new check for the author of a submission
2022-09-04 11:42:36 +02:00
7da47a7b5c Improve tests based on expectations
Amends and improves da0a682f
2022-08-18 15:40:48 +02:00
cb0f30768f Change HTTP links to HTTPS 2022-08-17 01:29:27 +02:00
6803efc023 Fix order-dependent specs
The submission spec is removed as it was useless since 66c1b992
2022-08-12 11:39:42 +02:00
d9f40531fb Fix Rubocop offenses 2022-04-20 18:26:53 +02:00
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
5cc180d0e9 Fix rubocop, I18n, cleanup rebase 2021-11-01 17:12:52 +01:00
b6bc578aea Move submission scoring from controller concern to submission model
Localization and markdown formatting is now done in a controller
spec in order to bring this logic away from the data and towards
the view.
2021-11-01 17:12:50 +01:00
d0d1b1bffd Introduce strategy for runner behavior
The runner model is only a class responsible for storing information
now. Based on the configuration it picks a strategy for the runner
management. The Poseidon strategy is already implemented and tested.
The Docker strategy will follow.
2021-11-01 17:12:49 +01:00
cf58be97ee Fix 17 previously failing specs 2021-11-01 17:12:49 +01:00
5e913c8a1a Skip failing tests
17 tests are always failing, due to changes introduced when adding the
Runner abstraction. To know only these fail, they now get skipped in
order to make it apparent if tests that should not fail do fail in the
pipeline.
2021-11-01 17:12:48 +01:00
a0ca15c6ac Fix submission scoring during specs 2021-08-17 12:45:26 +02:00
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
48904a19fd Fix test for new custom file 2021-05-14 17:35:37 +02:00
36cacc2330 Pass exercise object instead of id to reject_illegal_file_attributes 2021-04-30 12:06:11 +02:00
88aa25e9a0 Add tests for rejecting illegal file attributes 2021-04-30 12:06:10 +02:00
0739e13b78 Fix LTI spec for clear_lti_session_data 2021-02-02 11:53:01 +01:00
c32e7586cd Remove consumer_id from session
* Each external (and also internal) user has a consumer attached. We don't need that information twice.
2020-11-25 21:19:18 +01:00
be3ec82bd4 Add new file role teacher_defined_linter 2020-10-15 00:43:57 +02:00
564b249e50 Refactor send_score to have access to the submission 2020-05-12 17:51:07 +02:00
f2c45b2488 Add more LTI debug messages 2020-03-04 19:37:05 +01:00
a0d8b30ef2 Implement support for some basic embed options for work sheets via LTI
This commit also fixes an issue with the flash messages being positioned too high and displayed for too long
2018-12-11 14:29:36 +01:00
de52db89f0 Upgrade Rails to version 5.2.1 and adopt code & specs where necessary
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:46:00 +01:00
d5e16c967d Reenable some LTI specs with mocked LTI parameter 2018-02-22 17:19:54 +01:00
0e26ab98c8 rename factory_girl_(rails) to factory_bot_(rails) 2017-11-15 15:18:07 +01:00
6d28f427d8 Add Ralf's comment to skipped tests 2017-10-25 10:12:29 +02:00
ffe4f65628 Adapt lti_spec to current functionality 2017-10-18 22:05:07 +02:00
350913de79 fixed LTI Spec 2017-03-21 10:31:33 +01:00
4af24d4317 fixing tests p2 lti_spec tests all passed 2017-01-13 00:37:07 +01:00
5fe12bfa78 fixing tests p1 2017-01-12 18:12:36 +01:00
325ea25849 Replaced session[:lti_parameters] with proper LtiParameter object.
Removed all tests that would be failing

TODO: decision if all LtiParameter objects for a certain user/consumer will be deleted when the user/consumer is deleted from the session, or only the LtiParameter object for the current exercise of the user/consumer.

TODO: replace removed tests with proper tests
2016-12-30 09:45:39 +01:00
6f1d8b2d38 Marked more locations that might require to be changed when we switch from session to LtiParameters Object 2016-12-27 07:48:59 +01:00
f4c01879bf preparations to replace session with lti_parameters object 2016-12-27 00:13:41 +01:00
1f46f7c3af execute test files concurrently 2015-03-16 17:51:46 +01:00
821b911ebb added tests 2015-02-23 17:37:48 +01:00
a13d1738e2 fixed multiple style guide violations 2015-02-17 10:23:01 +01:00