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

feat(Run): Allow teachers to archive runs #225

Merged
merged 10 commits into from
Sep 18, 2023
Merged

Conversation

geoffreykwan
Copy link
Member

@geoffreykwan geoffreykwan commented Apr 9, 2023

Changes

Added endpoints to

  • archive run
  • archive multiple runs
  • unarchive run
  • unarchive multiple runs

Created tables user_tags and acl_object_identity_to_user_tags tables. Run these database queries to create the tables.

CREATE TABLE `user_tags` (
    id bigint not null auto_increment,
    users_fk bigint not null,
    text varchar(100) not null,
    constraint user_tags_users_fk foreign key (users_fk) references users (id),
    primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `acl_object_identity_to_user_tags` (
    acl_object_identity_fk bigint not null,
    user_tags_fk bigint not null,
    constraint acl_object_identity_to_user_tags_acl_object_identity_fk foreign key (acl_object_identity_fk) references acl_object_identity (id),
    constraint acl_object_identity_to_user_tags_user_tags_fk foreign key (user_tags_fk) references user_tags (id),
    primary key (acl_object_identity_fk, user_tags_fk)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Modified acl_object_identity table. Run these database queries to apply the changes.

alter table acl_object_identity modify OPTLOCK int default 0;
update acl_object_identity set OPTLOCK=0 where OPTLOCK is NULL;

Test

Closes #224

@geoffreykwan geoffreykwan added the enhancement New feature or request label Apr 9, 2023
@geoffreykwan geoffreykwan self-assigned this Apr 9, 2023
@geoffreykwan geoffreykwan marked this pull request as ready for review April 9, 2023 16:52
@geoffreykwan geoffreykwan marked this pull request as draft April 15, 2023 20:30
@geoffreykwan geoffreykwan marked this pull request as ready for review August 17, 2023 16:24
Copy link
Member

@hirokiterashima hirokiterashima left a comment

Choose a reason for hiding this comment

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

I added some comments inline. It'd be good to not introduce unused methods with this PR.

Copy link
Member

@hirokiterashima hirokiterashima left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@breity breity left a comment

Choose a reason for hiding this comment

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

Looks good.

@geoffreykwan geoffreykwan merged commit fe5ac0d into develop Sep 18, 2023
@geoffreykwan geoffreykwan deleted the issue-224-archive-runs branch September 18, 2023 20:32
@geoffreykwan
Copy link
Member Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

breity pushed a commit to I-Sparkle-Germany/I-Sparkle-API that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat(Run): Allow teachers to archive runs
3 participants