TY1Fan / pe

0 stars 0 forks source link

Feature Flaw: Duplicate Assignment allowed #6

Open TY1Fan opened 2 weeks ago

TY1Fan commented 2 weeks ago

image.png

Steps to reproduce:

  1. Enter: add_assignment si/3 an/Assignment 1 ms/100
  2. Enter: add_assignment si/3 an/Assignment 1 ms/10000

Expected: Duplicate assignment error to be thrown

Actual: No error

Suggestion/ Why it is problematic: Both are titled assignment 1. This may confuse user as to what is the grade of assignment 1 as they seem to be duplicate assignment with different score. I think would be good to expand on the capability of your duplicate detection to detect same assignment title as well.

soc-pe-bot commented 2 weeks ago

Team's Response

Currently, our app does check for duplicate assignments, preventing assignments from simultaneously having the same name and max score.

It was intended behaviour that assignments with the same names but different max scores should be allowed.

This is because teachers may want to use general names for assignments, but have different maximum scores to distinguish them. This is to allow for more user flexibility while using our app.

For example, a math teacher may want to assign 2 homework assignments, generally titled "Math homework", but with different scores. This should be accepted behaviour as the teacher can already distinguish the assignments based on the maximum scores.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: Thank you for agreeing with my view that this feature is flawed. But I feel that there might be some misunderstandings in the issue raised as the dev team is responding to the behavior of the feature when I am not reporting a functionality bug. To clarify, I am reporting a feature flaw on the duplicate handling conditions.

I feel that having a duplicate when the title and max score is not intuitive to the users. While adding an additional condition will improve the flexibility of this feature, I feel that this would, at the same time, bring about more confusion. Just imagine users would have to memorize the max score in order to differentiate the assignments with the same title. In this case, since there is no remarks section for assignments, I feel that it would be better to be more restrictive in the duplicate detection so that users will input an assignment title that is more descriptive and easier for the users to differentiate rather than memorize the max score.

I think would be good to expand on the capability of your duplicate detection to detect same assignment title as well.

Actually what I meant for this line is that the duplicate detection should detect just same titles, irregardless of the max score. I would like to apologize for the lack of clarity on this.

Given my proposed implementation, the effort required to change would be minimal.

/**
     * Returns true if both assignments have the same assignmentName.
     * This defines a weaker notion of equality between two assignments.
     */
    public boolean isSameAssignment(Assignment otherAssignment) {
        if (otherAssignment == this) {
            return true;
        }

        return otherAssignment != null
                && otherAssignment.assignmentName.equals(assignmentName)
                && otherAssignment.maxScore == maxScore; // delete this line
    }

Since the changes to be made are minimal (prob less than 5 lines), and the dev team also recognized that theres a need to improve on this feature, I feel that this issue should be Accepted rather than NotInScope according to the course website.

Screenshot 2024-11-19 at 7.08.19 PM.pngScreenshot 2024-11-19 at 7.08.19 PM


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [x] I disagree **Reason for disagreement:** > A flaw that causes occasional inconvenience to some users, but they can continue to use the product. According to the course website, this is the definition for `Medium` severity bugs. Justification: 1. Having to memorize the max score to differentiate the assignments are inconvenient to the users. Especially for forgetful users. 1. For a user who is lazy and forgetful, this feature might lead to more confusion rather than convenience as he/she might use the same title for all assignments and purely rely on memorizing the max scores in order to differentiate the assignments. But due to her forgetful nature, he/she will forget and will lead to more trouble for her as he/she would need to find out all the past assignments and change the assignment titles 1. While it seems like it is less restrictive by having an additional condition to check for, I feel that, from another perspective, this might instead be more restrictive, as Assignments tend to have the same max score rather than different max scores. Take for instance, math assignments across all levels usually have a max score of 100. Hence, such a restriction might mean users are unable to record math assignment with the same max score when he/she would like to use the same title. I feel that this is a valid use case as the assignments are already tagged with an index. Hence, users should still be able to differentiate if the assignments are of the same max score. Given the justifications above, I would like to insist on my view that the severity should still be `Medium` as it does cause inconvenience to some users, especially if they misuse/abuse this feature.