Skip to content

Request#Approve Method Has Wrong Error Message #327

@cycomachead

Description

@cycomachead
  def approve
    @assignment = Assignment.find_by(id: @request.assignment_id)
    lms_facade = @assignment.lms_facade
    if @request.approve(lms_facade.from_user(@user), @user)
      redirect_to course_requests_path(@course), notice: 'Request approved and extension created successfully in Canvas.'
    else
      flash[:alert] = "Failed to approve the request. #{@request.errors.full_messages.join(', ')}"
      redirect_to course_requests_path(@course)
    end
  end

This shouldn't hard code the LMS name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions