Commit Graph

2434 Commits

Author SHA1 Message Date
9c71c6667a Install and use ToastUi markdown editor
Replace all usages of pagedown-bootstrap editor with the new editor.
Add styles to ensure the editor preview matches the final output.
2024-04-26 13:31:49 +02:00
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
c4b7bac6c7 Fix NameError on block forward
This is a regression from 27f128ad.

Fixes CODEOCEAN-12R
2024-04-24 17:54:25 +02:00
b11b8b9e1e Fix invalid column reference for non-detailed exercise statistics
Fixes CODEOCEAN-12D
2024-04-24 17:53:27 +02:00
6e4e376c91 Fix missing linter results caused by incorrect JS loop
Fixes CODEOCEAN-FRONTEND-69
2024-04-24 17:52:46 +02:00
88c6be88f1 Fix race condition on JavaScript initializer
Previously, ProgrammingGroups could have been undefined in rare cases. Therefore, we check whether the variable is properly defined before calling the method.

Fixes CODEOCEAN-FRONTEND-7D
2024-04-24 17:23:29 +02:00
6d66376aae Fix layout for exercise description on implement route
Regresses 9a9efd5c and a7fa9b5b
2024-04-24 17:16:46 +02:00
dd7b09e1e3 Improve visual difference for solved and soft-solved RfCs 2024-04-24 12:18:47 +02:00
7cc4fb00c6 RfCs: Allow filtering for any states
We want to differentiate between those RfCs explicitly marked as solved, those potentially solved since the author reached the maximum score, and those being unsolved where the author has not yet reached the full score yet.
2024-04-24 12:18:47 +02:00
e9941d8f47 Keep indention when displaying comments 2024-04-23 22:55:20 +02:00
9a9efd5caa Lint Slim files and fix offenses
The fixing was partially done manually and partially automatically.
2024-04-18 08:31:24 +02:00
27f128ad2d Fix Rubocop offenses 2024-04-18 08:28:46 +02:00
dab8f777b3 Extract Contributor concern as abstract class
During documentation of the pair programming feature, we noticed that the Contributor should be an abstract class, which is parent for the User and the ProgrammingGroup. With this commit, we perform these changes.
2024-04-02 16:56:49 +02:00
dfa970664d Escape text passed in collection sorting
Previously, the ID and title of tips and exercises newly added to the list were gathered from the DOM. While we keep this mechanism, we ensure to escape the text before reusing it.
2024-03-28 19:05:55 +01:00
4f8d313da4 Use webpack to deliver newest ACE editor
With this commit, we change the delivery method for the ACE editor from manually copied files to using yarn and webpack. As a side-change, we also modify how the mode is selected through JavaScript instead of Ruby.

Through webpack, the `modePath`, `themePath`, and `workerPath` are automatically determined and working as expected.

Closes #250
2024-03-25 10:00:04 +01:00
942dbd20db Fix display of custom annotations in ACE Editor
With these changes, we no longer need our custom changes previously restored with 1013903.
2024-03-25 10:00:04 +01:00
e366ebd34c Resolve deprecation warnings for ACE Editor 1.32.6 2024-03-25 10:00:04 +01:00
117d3366ad fix kramdown using curved quotes and replace them with straight quotation marks 2024-03-14 17:03:00 +01:00
57073429d3 Extract choose_locale method, similar to CodeHarbor 2024-03-09 18:51:38 +01:00
04863f1f25 Update Ruby to 3.3 2024-01-19 12:49:00 +01:00
60dad19ea5 Rename .js.erb files .js
Since we switched to more I18n-JS and JsRoute functions with f5739a33 and 2f03061f, we don't have the need to use a template engine for those files any longer.
2024-01-19 11:06:40 +01:00
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