remove sis sync status from gradebook
test plan: * the sync status should not be shown in the gradebook's section list * test with the 'Post Grades to SIS' feature enabled * test with a post grades lti tool installed fixes SIS-1550, SIS-1552 Change-Id: I7dffafc9d1b2cddb397b7656db868c439d59e5ea Reviewed-on: https://gerrit.instructure.com/67377 Tested-by: Jenkins Reviewed-by: Andrew Butterfield <abutterfield@instructure.com> Reviewed-by: Max Stahl <mstahl@instructure.com> Reviewed-by: Nick Houle <nhoule@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com> Product-Review: Ken Romney <kromney@instructure.com>
This commit is contained in:
parent
b15408cb2a
commit
0af1e667c8
|
@ -128,9 +128,6 @@ define [
|
|||
})
|
||||
postGradesDialog.open()
|
||||
|
||||
if(@options.post_grades_feature_enabled)
|
||||
ajax_calls.push($.ajaxJSON( @options.course_url, "GET", {}, @gotCourse))
|
||||
|
||||
# getting all the enrollments for a course via the api in the polite way
|
||||
# is too slow, so we're going to cheat.
|
||||
$.when(ajax_calls...)
|
||||
|
@ -324,10 +321,6 @@ define [
|
|||
gotAssignmentGroupsChunk(groups) for [groups, x, y] in responses
|
||||
@gotAllAssignmentGroupsPromise.resolve()
|
||||
|
||||
|
||||
gotCourse: (course) =>
|
||||
@course = course
|
||||
|
||||
gotSections: (sections) =>
|
||||
@sections = {}
|
||||
for section in sections
|
||||
|
@ -1012,17 +1005,13 @@ define [
|
|||
|
||||
sectionList: ->
|
||||
_.map @sections, (section, id) =>
|
||||
if(section.passback_status)
|
||||
date = new Date(section.passback_status.sis_post_grades_status.grades_posted_at)
|
||||
{ name: section.name, id: id, passback_status: section.passback_status, date: date, checked: @sectionToShow == id }
|
||||
{ name: section.name, id: id, checked: @sectionToShow == id }
|
||||
|
||||
drawSectionSelectButton: () ->
|
||||
@sectionMenu = new SectionMenuView(
|
||||
el: $('.section-button-placeholder'),
|
||||
sections: @sectionList(),
|
||||
course: @course,
|
||||
showSections: @showSections(),
|
||||
showSisSync: @options.post_grades_feature_enabled,
|
||||
currentSection: @sectionToShow)
|
||||
@sectionMenu.render()
|
||||
@togglePostGrades(not @sectionToShow? or @sectionList().length is 1)
|
||||
|
@ -1035,10 +1024,7 @@ define [
|
|||
@togglePostGrades(not @sectionToShow? or @sectionList().length is 1)
|
||||
|
||||
showSections: ->
|
||||
if @sections_enabled && @options.post_grades_feature_enabled
|
||||
true
|
||||
else
|
||||
false
|
||||
@sections_enabled
|
||||
|
||||
gradingPeriodList: ->
|
||||
_.map @gradingPeriods, (period) =>
|
||||
|
@ -1091,7 +1077,7 @@ define [
|
|||
$('#post_grades').toggle(menuVisible)
|
||||
|
||||
initHeader: =>
|
||||
@drawSectionSelectButton() if @sections_enabled || @course
|
||||
@drawSectionSelectButton() if @sections_enabled
|
||||
@drawGradingPeriodSelectButton() if @mgpEnabled
|
||||
|
||||
$settingsMenu = $('#gradebook_settings').next()
|
||||
|
|
|
@ -114,7 +114,6 @@ define [
|
|||
sections: sections,
|
||||
course: {name: @options.course_name},
|
||||
showSections: sections,
|
||||
showSisSync: @options.post_grades_feature_enabled,
|
||||
currentSection: @sectionToShow)
|
||||
@sectionMenu.render()
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ define [
|
|||
|
||||
@optionProperty 'sections'
|
||||
@optionProperty 'course'
|
||||
@optionProperty 'showSisSync'
|
||||
@optionProperty 'showSections'
|
||||
|
||||
@optionProperty 'currentSection'
|
||||
|
@ -32,10 +31,6 @@ define [
|
|||
@defaultSection = @determineDefaultSection()
|
||||
if @sections.length > 1
|
||||
@sections.unshift(name: @defaultSection, checked: !options.currentSection)
|
||||
if options.course && options.course.passback_status
|
||||
date = new Date(options.course.passback_status.sis_post_grades_status.grades_posted_at)
|
||||
@sections[0].passback_status = options.course.passback_status
|
||||
@sections[0].date = date
|
||||
@updateSections()
|
||||
|
||||
render: ->
|
||||
|
@ -68,16 +63,12 @@ define [
|
|||
section
|
||||
)
|
||||
|
||||
showSisSync: ->
|
||||
@showSisSync
|
||||
|
||||
showSections: ->
|
||||
@showSections
|
||||
|
||||
toJSON: ->
|
||||
{
|
||||
sections: @sections,
|
||||
showSisSync: @showSisSync,
|
||||
showSections: @showSections,
|
||||
currentSection: _.findWhere(@sections, id: @currentSection)?.name or @defaultSection
|
||||
}
|
||||
|
|
|
@ -291,8 +291,8 @@ class GradebooksController < ApplicationController
|
|||
js_env :GRADEBOOK_OPTIONS => {
|
||||
:chunk_size => chunk_size,
|
||||
:assignment_groups_url => api_v1_course_assignment_groups_url(@context, :include => ag_includes, :override_assignment_dates => "false"),
|
||||
:sections_url => api_v1_course_sections_url(@context, :include => 'passback_status'),
|
||||
:course_url => api_v1_course_url(@context, :include => 'passback_status'),
|
||||
:sections_url => api_v1_course_sections_url(@context),
|
||||
:course_url => api_v1_course_url(@context),
|
||||
:students_url => api_v1_course_enrollments_url(@context, :include => [:avatar_url], :type => ['StudentEnrollment', 'StudentViewEnrollment'], :per_page => per_page),
|
||||
:students_url_with_concluded_enrollments => api_v1_course_enrollments_url(@context, :include => [:avatar_url], :type => ['StudentEnrollment', 'StudentViewEnrollment'], :state => ['active', 'invited', 'completed'], :per_page => per_page),
|
||||
:submissions_url => api_v1_course_student_submissions_url(@context, :grouped => '1'),
|
||||
|
@ -334,7 +334,6 @@ class GradebooksController < ApplicationController
|
|||
:attachment => @last_exported_gradebook_csv.try(:attachment),
|
||||
:sis_app_url => Setting.get('sis_app_url', nil),
|
||||
:sis_app_token => Setting.get('sis_app_token', nil),
|
||||
:post_grades_feature_enabled => Assignment.sis_grade_export_enabled?(@context),
|
||||
:list_students_by_sortable_name_enabled => @context.list_students_by_sortable_name?,
|
||||
:gradebook_column_size_settings => @current_user.preferences[:gradebook_column_size],
|
||||
:gradebook_column_size_settings_url => change_gradebook_column_size_course_gradebook_url,
|
||||
|
|
|
@ -15,13 +15,6 @@
|
|||
<a href="#">
|
||||
<label for="section_option_{{id}}">{{{name}}}</label>
|
||||
<input id="section_option_{{id}}" type="radio" value="{{id}}" name="section_to_show_radio" {{#if checked}} checked {{/if}} />
|
||||
{{#if ../showSisSync}}
|
||||
{{#if passback_status}}
|
||||
<i align="right" style="font-size:12px"> -- Last Sync ({{{passback_status.sis_post_grades_status.status}}}): {{{datetimeFormatted date}}}</i>
|
||||
{{else}}
|
||||
<i align="right" style="font-size:12px">{{#t}}-- Section not synced yet{{/t}}</i>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
|
|
@ -7,7 +7,7 @@ define [
|
|||
|
||||
sections = [{id: 1, name: 'Section One', checked: true},
|
||||
{id: 2, name: 'Section Two', checked: false}]
|
||||
course = {id: 1, name: 'Course One', checked: false, passback_status: {sis_post_grades_status: {status: 'status'}}}
|
||||
course = {id: 1, name: 'Course One', checked: false}
|
||||
currentSection = 1
|
||||
|
||||
module 'gradebook/SectionMenuView',
|
||||
|
@ -45,15 +45,9 @@ define [
|
|||
|
||||
module 'gradebook/SectionMenuView',
|
||||
setup: ->
|
||||
@view = new SectionMenuView(sections: sections, currentSection: currentSection, course: course, showSisSync: true)
|
||||
@view = new SectionMenuView(sections: sections, currentSection: currentSection, course: course)
|
||||
@view.render()
|
||||
@view.$el.appendTo('#fixtures')
|
||||
|
||||
teardown: ->
|
||||
$('#fixtures').empty()
|
||||
|
||||
test 'it displays sync data', ->
|
||||
@view.$el.find('button').click()
|
||||
html = $('.section-select-menu:visible').html()
|
||||
ok html.match(/-- Last Sync/g), 'displays last sync'
|
||||
ok html.match(/-- Section not synced yet/g), 'displays section not synced'
|
||||
|
|
Loading…
Reference in New Issue