Commit Graph

65 Commits

Author SHA1 Message Date
d0fcb6d695 Explicitly state permissions for CommunitySolutionPolicy 2024-05-24 15:21:11 +02: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
79ce069f68 Add CRUD operations for Programming Groups
* Correct sorting in table
* Modify page when nested in exercises
* Fix links between pages
* Link from statistics page to programming_groups/index
* Link from submission page to programming_groups/<id>
* Allow filtering for exercise ID on ProgrammingGroup#index
* Add search fields for internal and external user id on pg/index
2023-10-23 18:17:42 +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
e767cff309 Fix flaky tests dependent on exercise.reload for files 2023-09-16 16:57:59 +02:00
97764bd02e Limit programming groups to two people
* adapt text on programming_groups/new site
* in German change from 'Sie' to 'du'
2023-09-05 22:56:51 +02:00
235bf771fe Always use user object instead of ID and Type 2023-08-26 00:39:47 +02:00
89afb599e4 Apply changes from team members in own editor 2023-08-26 00:38:58 +02:00
01accdae58 Use author_in_programming_group? policy for files & RfCs
* Allow all members of a programming group to list and solve RfCs
* Also adjust policy specs to respect programming groups
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
28a4b672f9 Remove legacy save search endpoint 2023-07-28 13:18:39 +02:00
e097036296 Fix RfC Visibility to work as intended
The RfC Visibility of a consumer is intended to restrict who can access which RfCs. So far, those restrictions were only applied one way, for learners of a restricted consumer to view other (external) RfCs. However, the other way around should also work: If a RfC was created as part of a restricted consumer, no other external user should be able to interfere with this RfC. This commit, therefore, adds this direction as well and covers both directions with tests.
2023-07-13 11:02:10 +02:00
bcdc71021e Fix Rubocop offenses 2023-06-11 20:46:45 +02:00
76f592c88d Consider RfC visibility to view / change RfCs 2023-02-20 23:47:06 +01:00
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
5881795d5f Memorize config options instead of reading them from file over and over again 2022-09-23 21:35:22 +02:00
0e7c38657f Allow teachers to access internal users and manage them in their study groups 2022-09-22 19:24:26 +02:00
964048927a Updated teacher_in_study_group? method to check for common teacher role 2022-09-22 19:24:26 +02:00
521626275f Use create for all users in specs where necessary 2022-09-22 19:24:26 +02:00
9c9f45ff77 Redefine user roles with their role in a study group 2022-09-22 19:24:26 +02:00
49f4f0e6c5 Refactor exercise_controller and move more checks to policy
* We introduce a custom handler for Pundit::NotAuthorizedError
2022-09-04 00:05:13 +02:00
e5879eb606 Simplify permission specs
* Remove iteration if not required
* Unify usage of parentheses for `permissions` call
2022-08-22 17:51:57 +02:00
e0c2c7b806 Hide score button if exercise has no tests
We check for all teacher-defined assessments (linter and unit tests) to determine whether scoring should be possible
2022-08-22 17:51:57 +02:00
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
30603cb7ab Generalize method and constant names for runner management 2021-11-01 17:12:53 +01:00
0280c0282e Add tests for synchronizing all execution environments
This adds policy tests to ensure only an admin can synchronize all
execution environments. It also adds controller tests that check that
all execution environments get synchronized.
2021-11-01 17:12:49 +01: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
40d83dbb1d Fix access to exercise-specific RfC listing 2021-04-07 14:06:32 +02:00
293bcccc80 Introduce new enabled option for CodeHarbor
* Fix tests to ensure they work independent of config option
2021-02-16 14:29:54 +01:00
f5492ca35d Improve CodeOcean::FilePolicy with specs 2020-12-07 14:41:30 +01:00
835b70b000 fix typo 2020-10-29 18:22:33 +01:00
517886ea0b fix codeharbor_export policies, add specs 2020-10-29 18:06:14 +01:00
afafe0c218 Adjust teacher permissions:
* Hide non-public exercises and proxy exercises
* Hide average working time value on statistic page
* Add hint about filter to submission page for teachers
* Hide display name from feedback page
2020-09-07 19:04:34 +02:00
914eeb6035 Add submission deadline to exercises and allow teachers to view their submissions 2020-05-07 21:23:27 +02:00
da8d31279c review points 2019-12-16 17:38:32 +01:00
c89ee6c102 model and policy specs 2019-12-07 13:11:48 +01:00
924f94f254 Fix failing tests for new permissions 2019-11-29 15:50:50 +01:00
3665058435 Fix tests and slightly refactor some policies 2018-12-12 14:09:20 +01:00
56c59a616e Completely remove old non-structured errors and migrate existing ones. 2018-11-30 11:27:25 +01:00
efacb5a6a9 Completely remove old hints connected to the execution environment 2018-11-28 01:21:13 +01:00
90defa8f89 Fix tests and rename request variable in specs to perform_request
Explanation: Using the variable name `request` might interfere with methods in Rails core system prevent successful test execution. See this issue: https://github.com/turbolinks/turbolinks-rails/issues/38
2018-11-06 16:49:42 +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
fc873cb053 second run of replacement regex from https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md ...
Nested calls seem to be fun..
2017-11-15 15:37:42 +01:00
0e26ab98c8 rename factory_girl_(rails) to factory_bot_(rails) 2017-11-15 15:18:07 +01:00
c937a1a9ef clean pull request 2016-10-24 23:02:44 +02:00
7a76c4c6f1 try out new code 2016-10-11 13:12:00 +02:00
1945a47109 apply changes after review 2016-10-11 12:44:16 +02:00
032c201b94 repair database query 2016-08-03 14:08:01 +02:00