Commit Graph

86 Commits

Author SHA1 Message Date
96f5f1f8d7 Enforce valid lis_outcome_service_url
Recently, a new institution joined CodeOcean and used a relative URL. This won't work, so that we are rejecting non-absolute URLs by now.
2024-04-26 10:21:53 +02:00
bcb6409126 Bump rubocop from 1.57.2 to 1.58.0 and fix offenses
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.57.2 to 1.58.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.57.2...v1.58.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 11:02:00 +01:00
b43dfa364e Improve LTI handling for InternalUsers 2023-11-23 14:42:10 +01:00
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
69cc0f3c25 Retry storing LTI data on invalid record
We might receive a `RecordInvalid` error, if one part (such as the external user) is already assigned (not unique). Hence, we just retry.

Fixes CODEOCEAN-TZ
2023-09-20 23:53:35 +02:00
f49d1c6a7b Catch EOFError when sending LTI scores
Fixes CODEOCEAN-VN
Fixes CODEOCEAN-VP
2023-09-20 23:19:48 +02:00
8dd157e346 Only send LTI score for external users 2023-09-06 00:28:34 +02:00
4b3f5d152b Set study group for current user during LTI launch 2023-09-05 16:00:03 +02:00
6eed794aa0 Retry store_lti_session_data
We need to store or update the LTI parameters. However, this operation is not atomic and multiple requests can interfere with our database operation. Therefore, we need to retry in case the record is not unique.

Fixes CODEOCEAN-TC
2023-08-28 22:20:46 +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
c6977b6319 Catch SocketError for LTI 2023-07-13 10:51:47 +02:00
6d3587e813 Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JS
2023-03-15 13:05:46 +01:00
5ddad9e83d Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JT
2023-03-14 15:34:28 +01:00
596a04b9da Handle ReadTimeouts for LTI consumer properly 2023-02-16 10:12:05 +01:00
bec235c8d6 Fix XML parsing with invalid LTI response
An invalid XML response may be returned if the LTI provider is unavailable and cannot handle our request. We decided against logging in Sentry as this affects a third party functionality we cannot fix ourselves.
Fixes CODEOCEAN-G2
2022-12-07 23:00:21 +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
4f0b8c3c42 Reduce usage of @current_user (use helper instead) 2022-11-02 12:27:38 +01:00
9c9f45ff77 Redefine user roles with their role in a study group 2022-09-22 19:24:26 +02:00
2ce9c4258a Remove New Relic 2022-04-29 22:53:36 +02:00
61d3bffe1a Keep LTI parameters after submitting through the web interface 2022-03-16 13:46:47 +01:00
5243808d54 Apply automatic rubocop fixes 2021-05-17 19:40:38 +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
b10e23dd16 Upgrade to newest Sentry 2021-03-04 14:02:16 +01:00
0f55c64ddd Refactor LTI study group assignment 2021-02-16 22:01:11 +01:00
a5da0eb91e Delete study_group_id for LTI users on sign out 2021-02-01 15:56:23 +01:00
6900d4ef2c Add collapse_exercise_description LTI parameter 2021-01-29 13:54:47 +01:00
423a5b08f9 Allow internal user to be part of an study group 2021-01-11 14:22:50 +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
993fb88f03 Enable submit via API client 2020-11-25 20:47:28 +01:00
1b5d1d3dca Reduce score sent via LTI if too late 2020-10-28 11:58:40 +01:00
4ee1f3aada Remove teacher access for informatiktag2020 2020-09-09 10:17:46 +02:00
6cae31ae8d Allow teacher access for informatiktag2020 2020-09-09 10:17:17 +02:00
5547ff5ac5 Fix comment 2020-05-12 17:54:37 +02:00
564b249e50 Refactor send_score to have access to the submission 2020-05-12 17:51:07 +02:00
ff0b72ead4 Always use last LtiParamters if multiple are stored.
Still unsure, how that could happen. We want to prevent that
2020-03-19 22:19:05 +01:00
42d5480167 Ensure to clear LTI session once the score is submitted 2020-03-06 16:32:31 +01:00
b63280ff97 Increase performace for studyGroup membership 2020-03-05 11:59:25 +01:00
ca1dd0e7dd Add more info for ReadTimeout issues 2020-03-05 10:38:00 +01:00
f2c45b2488 Add more LTI debug messages 2020-03-04 19:37:05 +01:00
58031587de Check @exercise prior usage 2020-03-04 17:57:45 +01:00
dbfc1b2e11 Add additional logging for Sentry 2020-03-04 17:42:07 +01:00
7b00bb483e Allow different StudyGroup names in CodeOcean than on MOOC platforms 2020-03-04 10:57:01 +01:00
67af04f82d Revert "Prevent updating the user role for LTI launches"
This reverts commit d9770396
2020-02-03 11:37:38 +01:00