order exports in /courses/X/content_exports
fixes CNVS-14765 test plan: - have a course with multiple content exports - /courses/X/content_exports should display them in order by date, descending Change-Id: I76356ab83b9631dd192dea18c331b425505a92d2 Reviewed-on: https://gerrit.instructure.com/39252 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: James Williams <jamesw@instructure.com> QA-Review: Clare Strong <clare@instructure.com> Product-Review: Jeremy Stanley <jeremy@instructure.com>
This commit is contained in:
parent
7dce219353
commit
5c09df93e5
|
@ -27,7 +27,7 @@ class ContentExportsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@exports = @context.content_exports_visible_to(@current_user).active.not_for_copy
|
@exports = @context.content_exports_visible_to(@current_user).active.not_for_copy.order('created_at DESC')
|
||||||
|
|
||||||
@current_export_id = nil
|
@current_export_id = nil
|
||||||
if export = @context.content_exports_visible_to(@current_user).running.first
|
if export = @context.content_exports_visible_to(@current_user).running.first
|
||||||
|
|
|
@ -75,7 +75,7 @@ describe ContentExportsController do
|
||||||
user_session(@teacher)
|
user_session(@teacher)
|
||||||
get :index, course_id: @course.id
|
get :index, course_id: @course.id
|
||||||
response.should be_success
|
response.should be_success
|
||||||
assigns(:exports).map(&:id).should == [@acx.id, @tcx.id, @tzx.id]
|
assigns(:exports).map(&:id).should =~ [@acx.id, @tcx.id, @tzx.id]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue