canvas-lms/lib/outcomes
Chrystal Langston cbcec541d5 Add 255 char limit error when importing friendly desc
When importing outcomes using a CSV file and friendly description
is supplied, check if the length of the description is over 255
characters.  If it is, throw an error and supply information in
the email sent to the user when the CSV file is done importing.

closes OUT-6156
flag=outcomes_friendly_description

test plan:
- tests pass & are sufficient
- Manual test plan:
  - Navigate to Outcomes Management in a Course in Canvas
  - Using the CSV attached to the ticket, import the outcomes
    by click on the Import button then dragging and dropping the
    file into the "Upload your Outcomes!" area
  - Once the process is completed,  you should see an error
    displayed with "There was a problem importing some
    of the outcomes in the uploaded file. Check your email for
    more details."
  - Assert the outcome did not import.
  - Check the email message to ensure the error was recorded
    - Go to http://mail.canvas.docker/ to view the email
    - You should see "Row 3: Friendly description is too
      long (maximum is 255 characters)" in the message
  - Create another CSV that contains friendly description
    and is less than 255 characters
  - Import the CSV
  - Assert the outcome(s) did import and no error is thrown.

Change-Id: Ifb77f2e2b83b7ab8ed340ec8b26f757fe80b34f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Jody Sailor
2024-02-22 20:22:20 +00:00
..
csv_importer.rb Add 255 char limit error when importing friendly desc 2024-02-22 20:22:20 +00:00
enrollments.rb add # frozen_string_literal: true for lib 2020-10-27 20:49:50 +00:00
import.rb Rubocop for ruby 3.1 2023-06-06 16:44:26 +00:00
learning_outcome_group_children.rb Filter Out Alignments to Deleted Quizzes in Alignments Summary 2023-10-20 16:58:46 +00:00
outcome_friendly_description_resolver.rb rubocop: Style/TernaryParentheses, Style/RedundantParentheses 2023-04-12 14:56:48 +00:00
result_analytics.rb Rubocop for ruby 3.1 2023-06-06 16:44:26 +00:00