Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General: Hide group name customization by default #8432

Merged
merged 15 commits into from
Apr 26, 2024

Conversation

pzdr7
Copy link
Contributor

@pzdr7 pzdr7 commented Apr 18, 2024

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I strictly followed the client coding and design guidelines.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Renaming the groups of courses used to be necessary when working with external user management (Jira). Since 7.0.0 support for Jira has been dropped. The corresponding fields are still available to admins by default when they edit a course.

While this feature can still be useful (e.g. for testing and development), this operation is potentially dangerous: changing the name of a group does not affect which users are in which group -> a course may lose all of its students if the corresponding group is renamed.

Description

  • The group name customization checkbox is now always visible and always disabled by default on production.
  • The tooltip now warns about the dangers of changing the group name.
  • Non-production behavior is unchanged.

Steps for Testing

Prerequisites:

  • Test Server 3 (or any server where you have admin permissions)
  • 1 Admin
  1. Log in
  2. Go to course management > create a new course
  3. Verify that the checkbox "Customize group names" is not checked.
  4. Fill in the required fields and create the course.
  5. Go to course management > {your course} and view the group names. Verify that they are not customized (should look like artemis-yourcourseshortname-students , ...-tutors, ...-editors and ...-instructors)
  6. Edit the course a few times.
  7. Verify that the checkbox for group name customization is never active by default and that the group names only change if you keep the checkbox checked and modify the values.
  8. Verify that the tooltip next to the checkbox looks good in both German and English.

To keep the test server tidy, please delete the course you've created once you're done

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced the course update form to always display the option for customizing group names.
    • Updated logic to pre-fill group names based on user profiles during course creation and editing.
  • Documentation

    • Updated German and English language files to include warnings about potential access loss when customizing group names.
  • Bug Fixes

    • Adjusted test suite to properly initialize and reset course values when toggling the customization of group names.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Apr 18, 2024
@pzdr7 pzdr7 marked this pull request as ready for review April 23, 2024 13:23
@pzdr7 pzdr7 requested a review from a team as a code owner April 23, 2024 13:23
Copy link

coderabbitai bot commented Apr 23, 2024

Walkthrough

The recent updates refine the feature for customizing group names in courses. Changes ensure the visibility of the option to customize group names and adjust the logic based on user profiles and course status (new or existing). Descriptions in multiple languages now caution against unnecessary customization to prevent access issues.

Changes

File Path Change Summary
.../course-update.component.html Moved a conditional check to always display the form element for customizing group names.
.../course-update.component.ts Adjusted logic for group name customization based on user profile and course status.
.../i18n/de/course.json, .../i18n/en/course.json Updated descriptions to caution against unnecessary customization of group names, highlighting access risks.

Possibly related issues


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 23, 2024
edkaya
edkaya previously approved these changes Apr 24, 2024
Copy link
Contributor

@edkaya edkaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on ts3, works as expected

@pzdr7
Copy link
Contributor Author

pzdr7 commented Apr 25, 2024

If the group names have been customized, I would expect the checkmark still to be ticked after pressing save - I do not understand why it shall always be unchecked when the page is loaded; what is the reason behind that? For me that is unintuitive 😅

I discussed this with Stephan - the reason for always leaving the box unchecked is that the decision to customize the group names should not be taken lightly. This behavior forces the admin (who may not necessarily be the same admin that created the course) to make the conscious decision to customize the group names instead of immediately being presented with the text fields.

@pzdr7 pzdr7 dismissed stale reviews from coderabbitai, edkaya, and beyzaaltuntas via c2cfe51 April 25, 2024 23:06
Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing my comments! 🙌

The code looks good to me and tested on ts3

Copy link
Contributor

@beyzaaltuntas beyzaaltuntas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapprove.

Copy link
Contributor

@edkaya edkaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on ts3, works as expected. Reapprove

Copy link
Contributor

@coolchock coolchock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@krusche krusche added this to the 7.0.2 milestone Apr 26, 2024
@krusche krusche merged commit 0fcfd55 into develop Apr 26, 2024
22 of 29 checks passed
@krusche krusche deleted the enhancement/hide-editing-group-names branch April 26, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review small tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants