Commit Graph

2413 Commits

Author SHA1 Message Date
5b35ccdfe8 Reuse jQuery selector where possible 2024-01-19 11:06:40 +01:00
affeb2d3ba Remove obsolete user_id leftover in requestComments() 2024-01-19 11:06:40 +01:00
a9e1d491be Use safe comparison in JavaScript 2024-01-19 11:06:40 +01:00
9147482876 Use JsRoutes in .js.erb files 2024-01-19 11:06:40 +01:00
34aac83909 Use I18n-JS rather than rails-i18n in .js.erb files 2024-01-19 11:06:40 +01:00
d6c4df1bac Remove JavaScript debugger statement 2024-01-19 11:06:40 +01:00
7a1330323c Fix Sorcery conflict for redirect_back_or_to
See https://github.com/Sorcery/sorcery/issues/296
2024-01-19 11:06:40 +01:00
c280a58214 Resolve Rails.application.secrets deprecation 2024-01-19 11:06:40 +01:00
9a280615c5 Fix downloading runner files
Fixes a regression introduced with 8fc5123b
2024-01-19 11:06:40 +01:00
43f93af575 Fix missing confirmation when deleting a user-generated file 2024-01-19 11:06:40 +01:00
bf0e6149da Remove obsolete context-type attribute for submissions
The value and function is no longer used.
2024-01-19 11:06:40 +01:00
6d62dfc3de Remove anchor replacement in active_file.filename
Previously, this replacement was required, but it is no longer (since we are not using some form of direct user-input).
2024-01-19 11:06:40 +01:00
21e0784af5 Rewrite createSubmissionCallback to use real forEach loop 2024-01-19 11:06:40 +01:00
e2c8156f0e Simplify forEach loops in JavaScript
See https://stackoverflow.com/a/9329476
2024-01-19 11:06:40 +01:00
d9381657f7 Add user_exercise_interventions to ProgrammingGroups
This is a regression from 1bb61f73
2024-01-19 11:06:40 +01:00
79faefde5a Set Content-Type nosniff for all downloads 2024-01-19 11:06:40 +01:00
8fd5829110 Use render_host for download_submission_file 2024-01-19 11:06:40 +01:00
17dd8b1267 Change syntax for routes with filename
Previously, the filename was URL-encoded, thus each / was replaced with %2F. This caused issues with some Apache2 configuration, smartly mingling with the URL to either encode it a second time (resulting in %252F) or decoding it (generating a real /). However, for authenticated file downloads with the JWT, we hardly require a byte-by-byte matching. With these changes, the URL parameter is no longer URL-encoded, so that Apache2 won't break our implementation any longer.

Further, we use this opportunity to get rid of the unnecessary .json extension for those filename routes, simplifying the routes generated and doing some further cleanup.
2024-01-19 11:06:40 +01:00
65212c4b4b Reduce file attributes in JSON for submission#show 2024-01-19 11:06:40 +01:00
8c41aa5a73 Disable Sentry context for render_protected_upload
In this action, we are not using a regular cookie/user to authenticate. However, we have a special token, that is JWT-based. Since it has the same name as the login token sent via email, we previously searched the database for it as part of configuring the Sentry context. This is now avoided.
2024-01-19 11:06:40 +01:00
f20fbbbd7a Fix display of renamed native files for exercises#implement 2024-01-19 11:06:40 +01:00
421b015cdc External User Statistics: Show Log in new line 2024-01-09 01:27:58 +01:00
a3dbd3dd27 Fix missing testrun log output
This is regression for a6f64c83
2024-01-09 01:27:58 +01:00
34c322f8c0 Fix Rubocop offenses 2023-12-25 14:02:41 +01:00
4723985b4c Support GitHub-flavored Markdown 2023-12-19 09:19:09 +01:00
245bcf4224 Submission Download: Pass ID file content instead of path
Fixes CODEOCEAN-11M
2023-12-14 15:25:07 +01:00
293bb5d4ab Switch to proper, dynamic route for SortableJS elements 2023-12-14 00:31:41 +01:00
5b654debbe Fix Rubocop offenses 2023-12-12 10:40:45 +01:00
768eb53f7a Reduce SQL queries for tag_statistics
Fixes CODEOCEAN-YP
2023-12-09 00:37:43 +01:00
1bb61f73fe Enable interventions for ProgrammingGroups and add indices 2023-12-08 21:33:06 +01:00
605ce66d62 Move hidden feedback explanation closer to checkbox 2023-12-08 20:43:39 +01:00
ef89b20986 Improve explanation for hidden feedback messages in tests 2023-12-08 20:25:02 +01: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
dccfe5cbc8 Reduce SQL queries for exercise batch update
Fixes CODEOCEAN-10D
2023-12-05 22:12:42 +01:00
a6f64c83a0 Reduce SQL queries for external user statistics
Fixes CODEOCEAN-100
Fixes CODEOCEAN-YN
Fixes CODEOCEAN-10H
2023-12-05 20:57:55 +01:00
f393d8cb48 Sentry: Allow backend filtering for WebSocket connections without frontend 2023-12-02 23:30:03 +01:00
5ddc5a8ca5 Redirect users after sign in to their desired page 2023-12-01 00:06:31 +01:00
b4ee21a00d Reduce global JavaScript variables for Turtle
Fixes
2023-11-25 01:18:19 +01:00
0bd7c93d65 Allow clicking on checkboxes for batch update 2023-11-24 16:41:49 +01:00
60b0a5b5a1 Improve SQL query for fetching contributor for feedback 2023-11-23 14:42:10 +01:00
e9f099d59f Properly nest UserExerciseFeedback
Fixes CODEOCEAN-108
2023-11-23 14:42:10 +01:00
b43dfa364e Improve LTI handling for InternalUsers 2023-11-23 14:42:10 +01:00
3b05a44b9e Allow programming groups to score exercises remotely 2023-11-23 14:42:10 +01:00
fe26378387 Extract ScoringChecks and rework RemoteEvaluations 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
1e06ab3fa9 Prevent cross access of PG for different exercise
Here, we are only checking the condition based on the URL if both parameters (exercise and programming group) are given. Otherwise, we skip the check.
2023-11-23 14:42:10 +01:00
3048cf2644 Remove unnecessary #to_s in controller 2023-11-23 14:42:10 +01:00
ee351198f5 Fix CommunitySolution after introduction of programming pairs 2023-11-23 14:42:10 +01:00
9b705fd538 Remove erroneous validation from CommunitySolution 2023-11-23 14:42:10 +01:00
ed7a3c848f Hide reference implementations if another file with same name is already present 2023-11-20 23:16:48 +01:00