Commit Graph

870 Commits

Author SHA1 Message Date
Sebastian Serth
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
kiragrammel
e2baa2ee55 Send score for all members of a programming group 2023-08-24 19:32:06 +02:00
kiragrammel
2fb8def1d0 Add PairProgrammingStudy
* Later used to create the A/B groups
2023-08-24 19:32:06 +02:00
kiragrammel
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
kiragrammel
0234414bae Rename user to contributor in submission 2023-08-24 19:32:06 +02:00
kiragrammel
97138288f4 Delete unused LTI params from session 2023-08-24 19:32:06 +02:00
Sebastian Serth
245c3dba8c Update from proforma to proformaxml 2023-08-24 00:14:41 +02:00
Sebastian Serth
269f135812 Fix Errno::ECONNRESET error for Tubesock
* We must not close the socket manually (with `client_socket.close`), as this would close it twice. Compare: 2c83794b85/lib/tubesock.rb (L92)
* When the socket is closed twice, nginx registers a `Connection reset by peer` error: `recv() failed (104: Connection reset by peer) while proxying upgraded connection`
* Tubesock automatically closes the socket when the `hijack` block ends and otherwise ignores `Errno::ECONNRESET`: 2c83794b85/lib/tubesock.rb (L161-L162)
2023-08-22 00:20:02 +02:00
Sebastian Serth
2f0cf615d0 Retry file conversion in case of DB connection issues
Fix CODEOCEAN-RZ
2023-08-21 13:34:11 +02:00
Sebastian Serth
4fc38c7208 Enable Sentry browser profiling 2023-08-18 09:52:52 +02:00
Sebastian Serth
5f21f99f55 Refactor conversion of files JSON for download
Tries fixing CODEOCEAN-RQ
2023-08-15 23:04:03 +02:00
Sebastian Serth
28a4b672f9 Remove legacy save search endpoint 2023-07-28 13:18:39 +02:00
Sebastian Serth
01f4f0c2cd Remove legacy CodePilot integration 2023-07-28 08:50:00 +02:00
Sebastian Serth
bf662ecb81 Remove legacy forum search and search buttons 2023-07-28 08:45:05 +02:00
Sebastian Serth
db56a690c7 Add option to suppress feedback messages
This is used to dynamically exclude some test results from being shown to users, but still allows them to run in the background (e.g., for research).
2023-07-27 10:38:49 +02:00
Sebastian Serth
5faf5be033 Fix Rubocop offenses 2023-07-27 09:32:45 +02:00
Sebastian Serth
fd2d94568a Handle OutOfMemory runner errors with gVisor 2023-07-21 16:38:49 +02:00
Sebastian Serth
264927e3c4 Fix unnecessary testrun for each successful test / score action.
This commit resolves a regression introduced by commit 9c3ec3c7.

We still might want to remove this false data from our database, which is still pending.
2023-07-15 19:00:26 +02:00
Sebastian Serth
c6977b6319 Catch SocketError for LTI 2023-07-13 10:51:47 +02:00
Sebastian Serth
bcdc71021e Fix Rubocop offenses 2023-06-11 20:46:45 +02:00
Sebastian Serth
b79f0015ad Fix rubocop offenses 2023-04-03 15:08:30 +02:00
Sebastian Serth
72ca8c57de Reduce SQL queries for querying tips.
Closes CODEOCEAN-KY
2023-04-02 17:11:53 +02:00
Sebastian Serth
0aa73d30e9 Reduce SQL queries for querying files when creating submissions
This is especially useful for the RemoteEvaluationsController.

Closes CODEOCEAN-KX
2023-04-02 17:05:22 +02:00
Sebastian Serth
e8a21ea319 Further optimize extracting errors
The previous solution worked, but always queried all ErrorTemplateAttributes, even if there was no match of the ErrorTemplate. This solution resolves this issue and still benefits from less SQL queries.
2023-03-21 07:34:31 +01:00
Sebastian Serth
7af7484f7a Improve performance of the FlowrController 2023-03-20 23:52:55 +01:00
Sebastian Serth
09809cc12e Preload error template attributes in SubmissionsController
The join operation is okay, since a similar one is otherwise performed automatically by Rails
2023-03-20 23:52:34 +01:00
Sebastian Serth
6d3587e813 Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JS
2023-03-15 13:05:46 +01:00
Sebastian Serth
a7cd85507e Reduce SQL queries in the exercise controller
Fixes CODEOCEAN-JK
2023-03-14 20:58:21 +01:00
Sebastian Serth
5ddad9e83d Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JT
2023-03-14 15:34:28 +01:00
Sebastian Serth
939b31967f Reduce SQL queries for score runs
Fixes CODEOCEAN-JR
2023-03-14 13:56:23 +01:00
Sebastian Serth
0dd931fba1 Add runner management health check for /ping
Even though we can check the health of the runner management, we would like to ensure an external health check validates the availability of all required services.
2023-03-13 22:54:14 +01:00
Sebastian Serth
0643bc8c0c Redirect health check monitoring to /ping
We previously optimized the SQL queries, so that anonymous users without any cookie sent no longer result in a database query. This is generally awesome, but it also allows our health check monitoring to pass even when no database connection can be established.
2023-03-13 22:11:53 +01:00
Sebastian Serth
5c98ec74f0 Add legal links to Help modal 2023-02-24 19:55:23 +01:00
Sebastian Serth
d6c95dd383 Default to first page for RfC pages 2023-02-22 00:05:33 +01:00
Sebastian Serth
2e825f2413 Fix pagination for RfCs 2023-02-21 23:44:34 +01:00
Sebastian Serth
7fe0fc02e2 Set Sentry context for RailsAdmin 2023-02-21 11:35:29 +01:00
Sebastian Serth
af843231d9 Add user details to RemoteEvaluationsController 2023-02-21 10:45:00 +01:00
Sebastian Serth
ddf041ac05 Check RfC visibility before redirecting users 2023-02-21 10:01:01 +01:00
Sebastian Serth
d0b713ddcd Dramatically improve RfC query
While the code gets more complex, the new query will first filter all relevant RfCs and only use the `with_last_activity` scope for the current page.

Using `distinct` in the policy is not required (no duplicated RfCs), but causes issues for the ordering otherwise. Therefore, it is removed.

Fixes CODEOCEAN-J2
2023-02-21 01:27:32 +01:00
Sebastian Serth
d0717fb178 Reduce SQL queries for RfC index actions
By using includes and carefully selecting objects through references, all required objects are only queried once.
2023-02-20 23:47:06 +01:00
Sebastian Serth
9c3392b324 Add consumer-based RfC Visibility settings
This setting will be useful to increase data protection, where users might not be allowed to see RfCs from other contexts.
2023-02-20 23:47:06 +01:00
Sebastian Serth
40c7a50834 Directly use ActiveRecord object instead of ID
This change will improve the performance by reducing unnecessary SELECT queries.
2023-02-18 19:28:26 +01:00
Sebastian Serth
6465404ebe Set sentry context after logging in 2023-02-18 19:27:46 +01:00
Sebastian Serth
9c3ec3c7ff Refactor submission scoring and testing
* Properly cancel code execution if running is prohibited
* Correctly monitor duration with Sentry
* Align methods with running submissions
2023-02-17 18:13:48 +01:00
Sebastian Serth
a1ec4579fe Properly cancel code execution if running is prohibited 2023-02-17 18:13:48 +01:00
Sebastian Serth
326b5fce51 Allow assigning tips during exercise create
Fixes CODEOCEAN-H6
2023-02-16 11:23:52 +01:00
Sebastian Serth
e9cf79085a Refactor listing files to be independent of exiting runners
Previously, we were always fetching files, even if not required (e.g., for score runs). Now, we reduce the number of file listings and use a dedicated callback.
2023-02-16 10:50:01 +01:00
Sebastian Serth
91c2e14fe8 Fix error handling during Runner::Connection close
Closes CODEOCEAN-HQ
2023-02-16 10:47:28 +01:00
Sebastian Serth
596a04b9da Handle ReadTimeouts for LTI consumer properly 2023-02-16 10:12:05 +01:00
Sebastian Serth
04504973ba Adjust Sentry's user context 2023-02-03 00:16:52 +01:00