Commit Graph

847 Commits

Author SHA1 Message Date
Samuel Lee f5af977ec2 fix discussion edit endpoint to create checkpoint
fix the discussion edit endpoint to create
checkpoints if none are found. This is to allow
editing a non checkpointed discussion into a
checkpointed discussion

closes VICE-4216
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- have a graded discussion that is not
  checkpointed
- go to edit the discussion and make it a
  checkpointed discussion and input checkpoint
  settings values
- save the discussion
- go back to edit the discussion and see that
  the discussion is now checkpointed with the
  respective checkpoint settings values

Change-Id: If8d285fd4c168ed0d02bf07a5198003c25ac31b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345780
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-04-23 16:23:09 +00:00
Drake Harper cecaf7659b Add submissionCommentDownloadUrl to submission interface
refs EVAL-4106
flag=platform_service_speedgrader

Test Plan:
- should be able to query submissionCommentDownloadUrl on submissions
- should see submissionCommentDownloadUrl in response in SG2

Sample Query:
query MyQuery {
  __typename
  legacyNode(_id: "1019", type: Course) {
    ... on Course {
      id
      _id
      name
      assignmentsConnection(filter: {userId: "5"}) {
        nodes {
          _id
          name
          submissionsConnection {
            nodes {
              submissionCommentDownloadUrl
            }
          }
        }
      }
    }
  }
}

Change-Id: Ie24328deb0e3df7e6cf86bdf3ea8164076985468
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345379
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2024-04-23 16:21:22 +00:00
Samuel Lee 034256e11f add checkpoints to update discussion mutation
add checkpoint to create discussion mutation.
This only supports reply to entry, reply to topic,
and additional replies required fields. This also
only supports updating a discussion with existing
checkpoints as the checkpoints updater service
will need to be modified to create checkpoints
if there are no existing checkpoints. This fix
will be done in VICE-4216.

closes VICE-4105
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- update an existing discussion with checkpoints
- set new points possible for reply to entry and
  reply to topic
- set new additional replies required
- save the discussion topic
- go to edit the discussion and confirm that
  the discussion is updated with the new values,
  can also confirm in rails console the sub
  assignment objects
- unclick the checkpoints checkbox and click save
- go back to edit the discussion and confirm
  that the checkpoints checkbox is no longer
  checked
- click on the checkpoints checkbox and confirm
  that the values in checkpoint settings are
  back to the default values
- in the rails console, confirm that
  the checkpoints have been deleted by checking
  the count of the sub assignments

Change-Id: Ifd2c118e58ec0781e1b94882be424d4ecec6bb48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345514
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2024-04-22 20:09:58 +00:00
Caleb Guanzon 897137beb3 add subAssignmentSubmissions to create discussion entry mutation
flag=react_discussions_post
flag=discussion_create
flag=discussion_checkpoints

fixes VICE-4214

test plan:
- create a checkpointed graded discussion
- as a student
- visit /graphiql
- create a new discussion root entry via graphql
```
mutation MyMutation {
  __typename
  createDiscussionEntry(input: {discussionTopicId: "7", message: "another day"}) {
    discussionEntry {
      _id
      message
    }
    errors {
      attribute
      message
    }
    mySubAssignmentSubmissions {
      _id
      submissionStatus
      submissionType
      submittedAt
      subAssignmentTag
      state
    }
  }
}
```
- where discussionTopicId and message are something you supply
- verify response looks like this
```
{
  "data": {
    "__typename": "Mutation",
    "createDiscussionEntry": {
      "discussionEntry": {
        "_id": "29",
        "message": "another day"
      },
      "errors": null,
      "mySubAssignmentSubmissions": [
        {
          "_id": "128",
          "submissionStatus": "submitted",
          "submissionType": "discussion_topic",
          "submittedAt": "2024-04-16T14:05:16-06:00",
          "subAssignmentTag": "reply_to_topic",
          "state": "submitted"
        },
        {
          "_id": "155",
          "submissionStatus": "submitted",
          "submissionType": "discussion_topic",
          "submittedAt": "2024-04-16T15:33:22-06:00",
          "subAssignmentTag": "reply_to_entry",
          "state": "submitted"
        }
      ]
    }
  }
}
```
-where for reply_to_topic, submissionStatus is submitted
- and reply_to_entry, only returns submitted when you have enough entries
to satisfy number of additional replies required

Change-Id: Idfee9c17b595ab1e14354e1c3c7fde9e10c0c813
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-04-22 18:37:12 +00:00
Spencer Olson 7144a54a10 support group assignments for sg2
refs EVAL-3842
flag=platform_service_speedgrader

Test Plan:
1. Enable Platform SpeedGrader
2. Create a group assignment (grading students as
   as group).
3. Go to SpeedGrader and verify the dropdown
   contains group names.
4. Change the student_id query param to be the ID
   of a student that is part of a group but is not
   the group represenative. Then navigate to
   SpeedGrader. Notice the student_id query param
   is changed to the group rep's ID.
5. Change the assignment to grade group students
   individually.
6. Go to SpeedGrader and verify the dropdown
   contains student names.
7. Verify the comments section includes the option
   to send the comment to the individual or the
   group. Try sending a comment to the individual
   and to the group and verify it works.

Change-Id: I3cbc9e57877b2b62ca3a018191483f3b75662451
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344689
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-04-19 17:45:39 +00:00
Caleb Guanzon bed9fc1b0a use sub_assignment_submissions in AssignmentType
flag=discussion_create
flag=discussion_checkpoints
flag=react_discussions_post

fixes VICE-4202

test plan:
- create a graded, checkpointed discussion
- as a student post a reply to the topic
- visit /graphql

- query this:
```
query MyQuery {
  legacyNode(_id: "7", type: Discussion) {
    ... on Discussion {
      id
      _id
      assignment {
        _id
        name
        mySubAssignmentSubmissionsConnection {
          nodes {
            submissionStatus
            submissionType
            subAssignmentTag
            _id
          }
        }
      }
    }
  }
}
```

-verify response looks something like this:
```
{
  "data": {
    "legacyNode": {
      "id": "RGlzY3Vzc2lvbi03",
      "_id": "7",
      "assignment": {
        "_id": "4",
        "name": "the first checkpoints assignment",
        "mySubAssignmentSubmissionsConnection": {
          "nodes": [
            {
              "submissionStatus": "submitted",
              "submissionType": "discussion_topic",
              "subAssignmentTag": "reply_to_topic",
              "_id": "128"
            },
            {
              "submissionStatus": "unsubmitted",
              "submissionType": null,
              "subAssignmentTag": "reply_to_entry",
              "_id": "155"
            }
          ]
        }
      }
    }
  }
}
```

Change-Id: Iec0ae798f9d00088f9b0726b85ed41f2e8f62d94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345416
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-04-17 18:34:18 +00:00
Samuel Lee 97234c71ed add checkpoint to create discussion mutation
add checkpoint to create discussion mutation.
This only supports reply to entry, reply to topic,
and additional replies required fields

closes VICE-4104
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- create a discussion with checkpoints
- set points possible for reply to entry and
  reply to topic
- set additional replies required
- submit the discussion topic
- go to edit the discussion and confirm that
  the discussion is checkpointed with the
  reply to topic, reply to entry, and additional
  replies required fields populated with the
  values set at creation
- go to the rails console and confirm that the
  newly created discussion topic's assignment
  contains two sub assignments with the correct
  point values and tag

Change-Id: I4f40c9b3abbadccab35b78661574a84a1e64ee6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345228
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-04-16 17:17:05 +00:00
Aaron Ogata 65887035ec remove unnecessary pre-loading of graphql schema
According to https://github.com/rmosolgo/graphql-ruby/pull/2418, this should no longer be needed because https://github.com/rmosolgo/graphql-ruby/pull/2363 has been merged.

Indeed, running specs locally:

```
bundle exec rspec --format documentation spec/graphql/mutations

Mutations::CreateInternalSetting
  creates and returns the internal setting

# does not appear in the slowest test list
Top 10 slowest examples (7.58 seconds, 5.5% of total time):
  Mutations::AddConversationMessage queues a job if needed
    1.38 seconds ./spec/graphql/mutations/add_conversation_message_spec.rb:174
```

Change-Id: I9ab70c405796fa541560aa69ea4f11d4423df3b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345267
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2024-04-15 20:48:28 +00:00
Samuel Lee 5efcaf89ab add ability to update checkpoint states
closes VICE-4103
flag=discussion_checkpoints
flag=discussion_create

Test Plan:
- create a graded discussion with checkpoints using the rails console
- below is an example to create a discussion with a reply to topic
  checkpoint
    basic_checkpointed_discussion =
        DiscussionTopic.create_graded_topic!(course:, title: "basic
        checkpointed discussion")
    checkpoint = Checkpoints::DiscussionCheckpointCreatorService.call(
        discussion_topic: basic_checkpointed_discussion,
        checkpoint_label: CheckpointLabels::REPLY_TO_TOPIC,
        dates: [{ type: "everyone", due_at: }],
        points_possible: 6
    )
- create another checkpoint for reply to entry with number of replies
    checkpoint = Checkpoints::DiscussionCheckpointCreatorService.call(
        discussion_topic: basic_checkpointed_discussion,
        checkpoint_label: CheckpointLabels::REPLY_TO_ENTRY,
        dates: [{ type: "everyone", due_at: }],
        points_possible: 7
        replies_required: 3
    )
- in the UI, edit the discussion topic with checkpoints and
  confirm that the graded and checkpoints checkboxes are selected
- confirm that in the checkpoint settings, the points possible and
  replies required are set in the number input with what was created
  in the rails console

Change-Id: Ib1f27dab1ad941289fef7697f600d3363514fad2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344818
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-04-12 16:10:34 +00:00
Omar Gerardo Soto-Fortuño 16d0144396 Add assignmentOverrides to CheckpointType
refs VICE-4039
flag=discussion_checkpoints

Test plan:
 - Specs pass.
 - Create a Checkpointed Discussion Topic with overrides
     using DiscussionCheckpointCreatorService. For an example,
     look at the added spec.
 - Run this query for the parent assignment, overrides should come back:
query MyQuery {
  legacyNode(_id: "1", type: Assignment) {
    ... on Assignment {
      id
      name
      checkpoints {
        dueAt
        name
        onlyVisibleToOverrides
        pointsPossible
        tag
        assignmentOverrides {
          nodes {
            _id
            allDay
            createdAt
            dueAt
            id
            set
            title
            unlockAt
            updatedAt
          }
        }
      }
    }
  }
}

Change-Id: I627820990ddafb17721c30dbac1d6ed5f9959089
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344004
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
2024-03-29 22:07:19 +00:00
Spencer Olson 66cc52bd6c allow fetching submission via assignment_id and user_id
closes EVAL-4029
flag=none

Test Plan:
1. Verify a user with permission to read a submission can fetch that
   submission via graphQL using its user_id and assignment_id

   query MyQuery {
     submission(userId: "23", assignmentId: "1") {
       userId
       _id
     }
   }

   Note that the ids can be provided as database IDs or graphQL IDs.

2. Verify that you can fetch the same submission via its ID:

   query MyQuery {
     submission(id: "123") {
       userId
       _id
     }
   }

   Note that the id can be provided as a database ID or graphQL ID.

3. Verify that you get an error response if you try to fetch the
   submission with:
   - no id or assignment_id or user_id
   - id and assignment_id
   - id and user_id
   - id and user_id and assignment_id

4. Verify a user without permission to read the submission gets a null
   submission back.

Change-Id: Ib7346905fc049e6de1766719e3b4f7e440a3a079
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343354
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2024-03-29 14:04:47 +00:00
Jason Gillett 09093baa58 Add assignment importantDates bool to graphql
refs LF-1384
flag=differentiated_modules

Test Plan
1. Open new discussion topic form
2. Edit a graded discussion
2. View payload, verify that assignment has importantDates field

Change-Id: I7e1221e98e81f620d6d5255f5541060095fcb855
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343907
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-03-28 16:45:06 +00:00
Samuel Lee 0c3f7efc9b add hyperlink to author and editor in discussions
add link to the names of the authors and editors for discussion posts
to open context card or to go to the user's profile

fixes VICE-4072
flag=react_discussions_post

Test Plan:
- as a teacher, create a group discussion with two students in a group
- as students 1 go to the discussion and reply
- as the teacher go to the discussion and click on student 1's name
- confirm that a context card appears for student 1
- click on the teacher author name and confirm that any non student
  enrollment goes to the profile page
- as student 2, edit the reply of student 1
- confirm that the edited by name can be clicked and goes to student 1's
  profile, as a teacher this will open a context card

Change-Id: I01e3964b0c9411ebe80616b7f6ab87b1e08f6892
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343096
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
2024-03-25 14:14:51 +00:00
Spencer Olson c1d31409e9 add graphql support to load grade statuses for course
closes EVAL-3998
flag=platform_service_speedgrader

Test Plan:
1. Verify you can get the "standard" grade statuses with:

  query MyQuery {
    course(id: "1") {
      gradeStatuses
    }
  }

  This should return "late", "missing", "none", and "excused". If the
  extended_submission_state feature flag is enabled, it should return
  "extended" as well.

2. Enable the custom_gradebook_statuses feature flag and create some
   custom statuses at the root account grading_settings page
   (accounts/:id/grading_settings/schemes). Verify you can get information
   about the custom statuses with:

   query MyQuery {
     course(id: "1") {
       customGradeStatusesConnection {
         nodes {
           color
           name
           _id
         }
       }
     }
   }

Change-Id: I5dde393dc8d9317ee08b697659861f5e36421415
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342128
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-03-06 20:14:50 +00:00
Spencer Olson 7d5dafbb8b set up graphql course section loading for sg2
closes EVAL-3839
flag=platform_service_speedgrader

Test Plan:
1. Create a course with two students, each in their own section (
   Student 1 -> Section 1, Student 2 -> Section 2).
2. Create three assignments: one assigned only to Student 1 (A1), one
   assigned only to Student 2 (A2), and one assigned to everyone (A3).
3. Make a query to get course sections and verify both sections are
  returned:

  query MyQuery {
    course(id: "1") {
      sectionsConnection {
        nodes {
          name
        }
      }
    }
  }

4. Make the same query, but add a filter to the sectionsConnection for
   assignmentId matching A1's id. Verify only Section 1 is returned.
5. Make the same query, but add a filter to the sectionsConnection for
   assignmentId matching A2's id. Verify only Section 2 is returned.
6. Make the same query, but add a filter to the sectionsConnection for
   assignmentId matching A3's id. Verify both sections are returned.
7. Make the same query, but add a filter to the sectionsConnection for a
   bogus assignmentId. Verify an error is returned with the message,
   "assignment not found".

Change-Id: Ia0e547bdd1dae823479b323b7d2f8ede48000e6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342019
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-03-06 19:41:44 +00:00
Chawn Neal 5ab74b1a74 fix submission sort by newest submission_comment
fixes VICE-3846
flag=none

Test Plan:
0) use test plan to setup data.
1) create 2 submission comments.
2) set last_comment_at:
- make sure the newest submission has
the newest last_comment_at.
3) For the older submission:
3a) create a new submission_comment.
4) make sure older_submission.last_comment_at
is still old, might need to reset.
5) the new, correct sort order should be: (older, newer)
i.e. by newest_comment.

Change-Id: I04c1cdf7276d4ce08cd6e461048bde5ef15fdd57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342136
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2024-03-06 16:22:45 +00:00
Drake Harper 476526572f Add wordCount to graphql submission type
ref EVAL-3848
flag=platform_service_speedgrader

Test Plan:
- as a student submit a text entry assignment
- in graphiql query the submission with word count attribute
- should give the correct word count

Sample Query:
query MyQuery {
  legacyNode(_id: "4", type: Assignment) {
    ... on Assignment {
      id
      name
      submissionsConnection {
        nodes {
          _id
          userId
          body
          wordCount
        }
      }
    }
  }
}

Change-Id: I224fd01ba4a5f31d9ceffadefcd2b00db30f5035
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342138
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2024-03-06 15:32:44 +00:00
Chris Soto 5bee58bc2e add rubric save as draft button
this commit adds a save as draft button to the rubric form. This button
is only displayed when a rubric has no current associations. When
clicked, the rubric is saved with a new workflow_state value of "draft".

closes EVAL-3637
flag=enhanced_rubrics

test plan:
- make sure graphql is updated
- create a rubric. you should see the "Save as Draft" button
- add a title and save as draft. you should be navigated back to the
  rubric list and see the rubric with a draft status
- edit the rubric and the click the "Save" button. you should be
  navigated back to the rubric list and the rubric should no longer have
  the draft status.
- edit the rubric. you should see the "Save as Draft" button still
  available.
- add that same rubric to an assignment.
- navigate back to the edit rubric page. you should no longer see the
  "Save as Draft" button.

Change-Id: Id1e68f1432cd17fab618b2c8dd0350acf0408e12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341595
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-03-01 21:42:58 +00:00
Spencer Olson b907b4bc59 add previewUrl to graphql submission interface
refs EVAL-3993
flag=platform_service_speedgrader

Test Plan:
- Verify you can fetch the previewUrl from a Submission or
  SubmissionHistory type. It should return the correct version number
  in the URL based on the attempt number (not submitted: version = 0,
  first submission: version = 1, second submission: version = 2, etc.)

Change-Id: I7d213e282a383a6b0df9589fd760a0f9232c1051
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341748
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-02-29 20:02:39 +00:00
Chris Soto e7cafa957e add rubric edit limited mode
with enhanced rubrics, we will only allow limited edited for rubrics
that have been assessed.

closes EVAL-3971
flag=enhanced_rubrics

test plan:
- Create a Rubric & assess it
- Edit the rubric and verify that the rubric is in limited mode
- You should only be allowed to edit the rubric name and description
- For the criteria, you should only be allowed to edit the
  name and description of the criteria and it's ratings.
- Other actions such as drag and drop, adding new criteria,
  deleting criteria, etc should be disabled.

Change-Id: Ie8c2dd7c938058d2ff58d4a1d480568c5a9da908
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340971
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-02-27 21:43:13 +00:00
Samuel Lee 17bbce3c91 fix inbox message reply for users not in course
fix issue where a teacher who is in two courses and is replying
to a conversation for one of the courses is able to add a student
that does not belong in the conversation's course context.

fixes VICE-3856
flag=react_inbox

Test Plan:
- have a teacher that is in two courses
- have two students who are unique to each one of the two courses
- compose a message to the teacher from one of two students
- as the teacher, reply to the message and try to add the other student
  that is not in the course the conversation is attached to
- confirm that the student does not show up in the dropdown

Change-Id: Ia2f51f745ffb85063feaa7ef50bd73652e8bd906
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341060
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-02-26 19:15:36 +00:00
Jason Gillett f9419173d9 Allow announements that are locked for comments to display message
refs VICE-4073
flag=react_discussions

Test Plan
1. Create an announcement
2. make sure it does not allow comments
3. View as a student
4. Verify that reply buttons do not appear
5. Verify that the content of the announcement appears

Change-Id: If6b6039676e905cd56cb8bf9f4db43c0c170f9f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341203
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-02-26 19:14:29 +00:00
Jason Gillett 7679d5b3b9 Allow discussion user roles to be retrieved without extra variable
refs VICE-4101
flag=react_discussion

Test Plan
1. In graphiql you should be able to get
a discussion author's or editor's course roles
without passing in the course_id

Change-Id: I2f8be036f6a145211a78829cfe2e49b3041cd8ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-02-23 20:25:21 +00:00
Jason Gillett 670cda40fe Allow sending messages to active sections
flag=react_inbox
closes VICE-4057

Test Plan
1. Create a course that is soft concluded
2. Have a section with a date override that extends past the course end
3. Verify that users in that section can
still send new messages

Change-Id: I9f95a57c4a45d47a92a183a72c71f1b274f69529
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340742
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-02-21 17:25:23 +00:00
Jason Gillett 8f72a81ff5 Allow users with enrollment overrides to send messages
closes VICE-3820
flag=react_inbox

Test Plan
1. Set up a course with a term date that ended
2. Set a term enrollment override for students
3. Verify that students can now send new messages

Change-Id: Ic6588b187a3249e24e14c454336a329372607f62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340740
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-02-20 19:24:29 +00:00
Kai Bjorkman cf582a06e1 ability to save rating_order of rubric ratings
This adds the 'rating_order' column to the rubrics table and adds the
ability to save the order of the ratings in the rubric form.

flag=enhanced_rubrics
closes EVAL-3626

test plan:
    - create a rubric and set a rating order
    - edit the rubric and change the rating order
    - verify that the rating order is saved

Change-Id: Ie355899ff4e4f0e56073deae5bc8ac86d98606d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339294
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-02-20 15:53:08 +00:00
Kai Bjorkman 5224d0d274 ability to save a button display for ratings
This adds the 'button_display' column to the rubrics table and adds the
ability to save the button_display of the ratings in the rubric form.

flag=enhanced_rubrics
closes EVAL-3627

test plan:
    - create a rubric and set a button_display
    - edit the rubric and change the button_display
    - verify that the button_display setting is saved

Change-Id: Iae0d994fbb83172324285616a8778290b5ac0943
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339298
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2024-02-16 19:02:58 +00:00
Jason Gillett 0f8e33afaa Add Module Pre-requisites
closes VICE-4073
flag=react_discussions

Test Plan
1. Verify that a locked discussion by availability date is
displayed the same way
2. Verify that a normal discussion displays its message correctly
3. Create a module
4. Create a new page in the module
5. Create a discussion topic within the module
6. Edit the module and add a requirement that students must move through
requirements in sequential order
7. publish the module and items
8. open the discussion
9. As a teacher, it hsould show normally
10. Click student view
11. Module lock information should appear

Change-Id: I26548dff151ff5953ef08e58c12c1cc873c47377
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340421
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
2024-02-14 17:16:52 +00:00
Chris Soto 9bb60b874c rubric redesign add load criteria
this commit removes the hard coded rubric criteria data and loads any
existing criteria in the UI. It also allows a user to open the criteria
modal by clicking on the "Edit" icon (ratings not loaded yet). It also
adds the ratings accordion that when clicked will show the rating.
details for a criterion. It also allows the rubric to be saved without
losing any criterion data.

closes EVAL-3940
closes EVAL-3633
flag=enhanced_rubrics

test plan:
- navigate to /rubrics
- click on a rubric for Edit
- verify that any existing criterion is loaded correctly and that the
  "Edit" icon is clickable and opens the criteria modal
- verify that the ratings accordion is clickable and shows the rating
  details for a criterion
- verify that the last option is the correctly numbered row with the
  "Draft New Criterion" button & "Create from Outcome button"
- verify that the rubric can be saved without losing any criterion data
- go back to /rubrics and click on "Create New Rubric"
- verify that no criterion is listed and only the buttons for creating
  new criterion are visible

Change-Id: I34e74b52c06ec25db84947f7c1566c554ec7425e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340042
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-09 16:44:43 +00:00
Samuel Lee cfa27b5d81 match assignment with legacy for graded discussion
match the assignment object with legacy when creating a
graded group discussion that has manual peer reviews and
overrides

closes VICE-4046
flag=discussion_create

Test Plan:
- create a new graded discussion with the setup shown in the image
  attached to the ticket
- verify that the following properties match legacy
    - description field is populated after setting description in
      RCE
    - when discussion is published, field should be set to "published"
      and "unpublished" when discussion is not published
    - submission_types is set to "discussion_topic"
    - peer_review_count is set to 0 when manual peer review is selected
    - group_category_id is set to nil
    - only_visible_to_overrides is set properly when everyone/everyone
      else is removed and added
   - group_category is set to nil

Change-Id: I331810c1b86e29bc6c8237c41631057b30c67849
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339396
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2024-02-07 17:40:17 +00:00
Omar Gerardo Soto-Fortuño 0dbcb998c7 Implement the deleter and updater services on UpdateDiscussionTopic
closes VICE-4091
flag=discussion_checkpoints

test plan:
  - Specs pass.

qa risk: low

Change-Id: I92633225c0aab85bbb6d4c265262280ea36c512d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-02-07 00:19:48 +00:00
Jason Gillett 039bd653ee Update form to use user_connection
flag=discussion_create
closes VICE-4042

Test Plan
1. Create or edit a dsicussion
2. Go to graded discussion options
3. Open AssignedTo field
4. Verify that the students are ordered by their
sortable name.

Change-Id: I572f3f67eb244c4d0f44605cdead5f05e368abae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
2024-02-01 17:12:45 +00:00
Chris Soto e804b73d1b add saving data to rubric form
this commit sets the foundation for saving & creating rubric changes on
the rubric form. it adds a new mutation to the rubric form queries file
and adds a new type to the rubric form types file. it also adds a new
migration to add a hide_points column to the rubrics table. this current
change only saves title and hide_points, but it sets the foundation for
saving all rubric data for future commits.

fixes EVAL-3624
flag=enhanced_rubrics

test plan:
- navigate to either /courses/:course_id/rubrics or
  /accounts/:account_id/rubrics
- click on a rubric to navigate to the rubric form page
- make a change to the rubric title or hide points (score/unscored)
- click the save button
- you should be navigated back to the /rubrics page
- verify that the rubric title and hide points have been updated
- click on the rubric again to navigate to the rubric form page and
  verify that the rubric title and hide points have been updated
- go back to /rubrics and click on the create button
- fill out the rubric form and click the save button
- you should be navigated back to the /rubrics page
- verify that the new rubric has been created

Change-Id: Ieaa880310a98328710e0369a700a204ab5107540
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
2024-02-01 16:17:27 +00:00
Jason Gillett 1bc69c65b5 Disable group discussion option if can_group is false
closes VICE-4034
flag=discussion_create

Test Plan
1. Create a grouped discussion
2. As a student, reply to the grouped discussion
3. Edit the grouped discussion as teacher
4. Verify that you can not edit the grouped discussion
4a. verify that the selected group category appears
4b. Verify that the correct warning alert appears

Change-Id: Iee13fa31a5b72280230d8621b4bbb79363cefd12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339170
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-30 20:05:28 +00:00
Drake Harper b3be1b5c5a Add studentsConnection to section type
flag=none
refs EVAL-3910

Test Plan:
- query for studentsConnection on section in graphiql

Sample Query:
query MyQuery {
  legacyNode(_id: "2", type: Section) {
    ... on Section {
      id
      name
      students {
        nodes {
          _id
          id
          name
        }
      }
    }
  }
}

Change-Id: Id9378bbbdf61a17c062bf14d76cc9c3fb9ee7060
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338630
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-25 21:19:54 +00:00
Jeremy Stanley bb840f11eb remove graphql query timeout
because the transaction causes more trouble than the shorter
statement timeout solves

leave the transaction/timeout in place for mutations, since
tests depend on the atomicity it provides

test plan:
 - specs pass

flag=none
closes FOO-4149

Change-Id: I6c23934e8d000e08a400eb9049da058495f9ab55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338038
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2024-01-25 17:30:39 +00:00
Cody Cutrer 8eeebf32b3 bundle update rubocop
lots of autocorrect of RSpec/RedundantPredicateMatcher, and some
manual corrections of RSpec/RemoveConst (mostly ignoring it)

[skip-stages=Flakey]
[skip-crystalball]

Change-Id: I57a01c06a5f2dafd985912c5ea9dc18e199eddaa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337931
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-01-24 16:17:43 +00:00
Omar Gerardo Soto-Fortuño 1aebecdba3 Update DiscussionCheckpointDate to add lockAt and unlockAt
We also made due_at not required because
in fact, we missed that and it is not
required.

refs VICE-4020
flag=discussion_checkpoints

test plan:
  - Specs pass.
  - Make sure you can create checkpoints
      using lockAt and unlockAt for dates.

qa risk: low

Change-Id: Ic718b12274c6b0c1d436e10f3ed7dbeff256461e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-19 19:06:04 +00:00
Spencer Olson 018d49a87d fix graphql user -> enrollments state filtering bug
refs EVAL-3908
flag=react_inbox

When the `currentOnly: false` filter is provided, concluded and
deactivated enrollments should be returned. However, a bug exists where
only active or concluded enrollments are returned (not deactivated).
This fixes that bug (while continuing to filter out pending enrollments).

Test Plan:
- specs pass

Change-Id: I470d98b960745c1d3b644a941f4e7a484904c9ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338061
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-19 18:57:02 +00:00
Omar Gerardo Soto-Fortuño f77772dedb Update CreateDiscussionTopic to support checkpoints
refs VICE-4020
flag=discussion_checkpoints

test plan:
  - Specs pass.
  - Create a graded discussion topic with
      checkpoints using this mutation:
mutation MyMutation {
  createDiscussionTopic(
    input: {
      contextId: "1"
      contextType: Course
      title: "Checkpoints Test"
      assignment: { courseId: "1", name: "Test", forCheckpoints: true }
      checkpoints: [
        {
          checkpointLabel: "reply_to_topic",
          pointsPossible: 10,
          dates: [{ type: everyone, dueAt: "2016-07-10T18:00:00-01:00" }]
        },
        {
          checkpointLabel: "reply_to_entry",
          pointsPossible: 10,
          dates: [{ type: everyone, dueAt: "2016-07-15T18:00:00-01:00" }],
          repliesRequired: 3
        }
      ]
    }
  ) {
    discussionTopic {
      _id
    }
    errors {
      attribute
      message
    }
  }
}

qa risk: low

Change-Id: I750c26a5eda04eb98bdd1b7864415ef5d9c4dbab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337380
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-16 22:23:28 +00:00
Jason Gillett 642d0f75b0 convert anonymous_state to use enum
refs VICE-4033
flag=discussion_create

Test Plan
1. Verify that you can create and edit anonymous discussions still
2. Verify that graphiql displays the enums
in the anonymousState field

Change-Id: I3dc8a0956ac977320a40e3ba3ea86585aaf786b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337405
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-12 16:27:36 +00:00
Jason Gillett f0804f95dd Convert context_type to an enum
To better document what contexts a discussionTopic
can be in and to improve the usability of the graphql
createDiscussionTopic mutation, the context_type
field has been updated to an enum instead of a string

refs VICE-4033
flag=discussion_create

Test Plan
1. Verify that you can still create a new DiscussionTopic
2. Go to graphiql createDiscussionTopic mutation
3. Verify that context_type gives a list of enums to
choose from

Change-Id: Ia3ebe718d4949def1ffa5caf0350117c803b4456
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337404
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-12 15:52:18 +00:00
Chawn Neal d6c32e7f6e allow intraGroupPeerReviews on gradedDiscussion
fixes VICE-4015
flag=discussion_create

Test Plan:
0) can create graded group discussion with intraReviews.
1) can update graded group discussion to add intraReviews.
2) Cannot remove intraReviews.

Change-Id: I4648c722512717b901b3cd3f6571bc187b56e1fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336813
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-01-11 17:04:50 +00:00
Omar Gerardo Soto-Fortuño 54e052a0d3 Prevent setting restricted fields for parent assignments
refs VICE-4020
flag=none

test plan:
  - Specs pass.

qa risk: low

Change-Id: I87579353484660aea9dd88ab21e3fc897a6e0a24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336653
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-09 16:18:37 +00:00
Drake Harper c46e8a51d9 Add backend validations for discussion group category id
closes VICE-4001
flag=create_discussion

Test Plan:
- test with both graded and ungraded discussion
- create group discussion
- save
- edit discussion group category id

Change-Id: Id7be07efb7523a24a6ff5bf694b1f052b26ea2c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-01-08 19:59:58 +00:00
Jason Gillett f12dcdbd04 Add grading scheme selector
closes VICE-4016
flag=discussion_create

Test Plan
1. Create a new graded discussion
2. Set grading type to letter-grade
3. Verify that the new grading scheme menu appears
4. Veriy that the options work
5. Verify that you can save a new grading scheme
6. verify that you can edit the grading scheme

Change-Id: I1d6e44eb58ef2e34374b4a89eebe8b3aba1d665e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
2024-01-05 16:49:12 +00:00
Drake Harper 2df9dffdb2 Return only active child topics
refs VICE-4001
flag=discussion_topics_post

Test Plan:
- create a group discussion
- on the discussion page click the group button
- verify groups match selected group set
- edit the discussion to a new group set
- on the discussion page click the group button
- should see only groups belonging to new group set

Change-Id: Id83695306ac1f73466e0b6d183fd253f67d6a224
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336341
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2024-01-03 20:03:58 +00:00
Martin Yosifov f0ed6517e7 Add canArchive method to learningOutcomeType
closes OUT-6056
flag=archive_outcomes

Test plan:
- Create account outcome, create course with course outcome,
add the account outcome to the course and write down the
account id, course id and outcome ids.
- Open canvas.docker/graphiql and run query below by
replacing id, contextId and contextType as needed
query MyQuery {
  learningOutcome(id: "123") {
    canArchive(contextId: "1", contextType: "Account")
  }
}
- Verify that canArchive is true for the account outcome
in account context
- Verify that canArchive is false for the account outcome
in course context
- Verify that canArchive is true for the course outcome
in course context

Change-Id: I6310087b12408f91b0a3b39e00b299477b1dfdf7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-01-03 18:18:34 +00:00
Spencer Olson e67f851130 add SubAssignment model
closes VICE-3943
flag=discussion_checkpoints

Test Plan:
- specs pass
- Create an assignment, old quiz, new quiz and graded discussion
 assigned to multiple students and ensure each can be submitted
 to by the assigned students.
- Sanity check that the submissions can be viewed and graded
 within Speedgrader

Change-Id: I058a4093ee8bd00d8d7186fb6ada2dd5ba37d016
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334399
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-12-19 16:13:47 +00:00
Jason Gillett 0361d5589a Finalize isolated view removal
flag=none

This should be the last ticket to remove isolated
View code.

After this split-screen should have no isolated view logic
It should work correctly

There is still a caching issue for inline view that is being
worked on by another ticket

Test Plan
1. Verify that React discussion works correctly

Change-Id: I8b2a065cac70227c3109896548e7341f7992e841
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335228
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-12-18 17:27:27 +00:00