properly display submission in eportfolio

closes OUT-2543

Test plan:
- with user with multiple submissions
- create eportfolio
- add submission to page (highlight submission
  title, click "Select Submission")
- change selected submission, verify that only
  one submission (last selected) is shown
- save page, reload, verify that correct submission
  is shown
- edit page and change selected submission again, verify
  that only one the last selected submission shows

Change-Id: I90c382799be84401c8f7e33bc74c68c2940a4ac9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217207
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
This commit is contained in:
Michael Brewer-Davis 2019-11-13 22:41:42 -06:00 committed by Michael Brewer-Davis
parent 0792f9d96a
commit 0db8602382
1 changed files with 3 additions and 2 deletions

View File

@ -449,12 +449,13 @@ $(document).ready(function() {
$section.fillTemplateData({
data: {submission_id: id}
})
$section.find('.section_content').empty()
const $sectionContent = $section.find('.section_content')
$sectionContent.empty()
const $frame = $('#edit_content_templates')
.find('.submission_preview')
.clone()
$frame.attr('src', url)
$section.append($frame)
$sectionContent.append($frame)
$section.addClass('read_only')
$(this).focus()
$.screenReaderFlashMessageExclusive(I18n.t('submission added: %{title}', {title}))