add links to the outcome import csv format docs
fixes OUT-2026 Test plan: * Generate API docs: `bundle exec rake doc:api` * View outcomes page. There should be a link to the outcomes csv doc * Click Import to open the import modal. Oh, look there's a link! * Import an invalid csv file and check your email. The failure notification should have a link to the docs * All of the links should take you to the outcomes CSV formatting doc Change-Id: I380ab2c36be27ec1260179a02eb629bf91cfc748 Reviewed-on: https://gerrit.instructure.com/142946 Tested-by: Jenkins Reviewed-by: Augusto Callejas <acallejas@instructure.com> Product-Review: Neil Gupta <ngupta@instructure.com> QA-Review: Neil Gupta <ngupta@instructure.com>
This commit is contained in:
parent
8d6c05d8bf
commit
62a65a21f8
|
@ -25,6 +25,8 @@ import Heading from '@instructure/ui-core/lib/components/Heading'
|
|||
import FileDrop from '@instructure/ui-core/lib/components/FileDrop'
|
||||
import Billboard from '@instructure/ui-core/lib/components/Billboard'
|
||||
import Text from '@instructure/ui-core/lib/components/Text'
|
||||
import Link from '@instructure/ui-core/lib/components/Link'
|
||||
import Container from '@instructure/ui-core/lib/components/Container'
|
||||
import SVGWrapper from '../shared/SVGWrapper'
|
||||
|
||||
export function showImportOutcomesModal (props) {
|
||||
|
@ -115,6 +117,9 @@ export default class ImportOutcomesModal extends Component {
|
|||
</div>
|
||||
}
|
||||
/>
|
||||
<Container as="div" margin="large auto" textAlign='center'>
|
||||
<Link href="/doc/api/file.outcomes_csv.html">{I18n.t('Outcomes CSV Format')}</Link>
|
||||
</Container>
|
||||
</ModalBody>
|
||||
</Modal>
|
||||
)
|
||||
|
|
|
@ -192,10 +192,11 @@ class OutcomeImport < ApplicationRecord
|
|||
else
|
||||
subject = I18n.t 'Outcomes Import Failed'
|
||||
user_name = user.name.split('@').first
|
||||
doc_url = "#{HostUrl.protocol}://#{HostUrl.context_host(context)}/doc/api/file.outcomes_csv.html"
|
||||
errors_count = I18n.t({one: "1 error", other: "%{count} errors"}, count: error_count)
|
||||
errors_lead = error_count <= 100 ? I18n.t('The following errors occurred:') : I18n.t('Here are the first 100 errors that occurred:')
|
||||
rows = n_errors(100).map { |r, m| I18n.t("Row %{row}: %{message}", row: r, message: m) }.join("\n")
|
||||
body = I18n.t(<<-BODY, name: user_name, errors_count: errors_count, errors_lead: errors_lead, rows: rows, url: url).gsub(/^ +/, '')
|
||||
body = I18n.t(<<-BODY, name: user_name, errors_count: errors_count, errors_lead: errors_lead, rows: rows, doc_url: doc_url, url: url).gsub(/^ +/, '')
|
||||
Hello %{name},
|
||||
|
||||
Your outcomes import failed due to %{errors_count} with your import. Please examine your file and attempt the upload again at %{url}
|
||||
|
@ -203,6 +204,8 @@ class OutcomeImport < ApplicationRecord
|
|||
%{errors_lead}
|
||||
%{rows}
|
||||
|
||||
To view the proper import format, please review the Canvas API Docs at %{doc_url}
|
||||
|
||||
Thank you,
|
||||
Instructure
|
||||
BODY
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
{{/t}}
|
||||
</h2>
|
||||
<div class="description">
|
||||
{{#t "instructions.main.manage.description"}}
|
||||
<p>Outcomes are created here to track mastery in a course. To get started, checkout the menu bar along the top. Click on the New button to create a new outcome, or the New Group button to create a new group to organize your outcomes into. The Find button will allow you to use outcomes that have been created by your state or institution. As you create and use outcomes you will be able to use the panel to the left to navigate through your outcomes. You can drag and drop outcomes between the different levels to create structure.</p>
|
||||
<p>More importantly, Canvas allows you to add outcomes to your grading rubrics so that you can evaluate mastery as you grade assignments. Once you've set up outcomes, click Manage Rubrics to start using your outcomes for grading.</p>
|
||||
{{/t}}
|
||||
<p>{{#t}}Outcomes are created here to track mastery in a course. To get started, checkout the menu bar along the top. Click on the New Outcome button to create a new outcome, or the New Group button to create a new group to organize your outcomes into. The Find button will allow you to use outcomes that have been created by your state or institution. As you create and use outcomes you will be able to use the panel to the left to navigate through your outcomes. You can drag and drop outcomes between the different levels to create structure.{{/t}}</p>
|
||||
<p>{{#t}}In order to import a large quantity of Outcomes at once, or to update your existing outcomes, please <a href="/doc/api/file.outcomes_csv.html">follow the CSV format</a>.{{/t}}</p>
|
||||
<p>{{#t}}More importantly, Canvas allows you to add outcomes to your grading rubrics so that you can evaluate mastery as you grade assignments. Once you've set up outcomes, click Manage Rubrics to start using your outcomes for grading.{{/t}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -183,6 +183,8 @@ describe OutcomeImport, type: :model do
|
|||
The following errors occurred:
|
||||
Row 1: Very Bad Error
|
||||
|
||||
To view the proper import format, please review the Canvas API Docs at http://localhost/doc/api/file.outcomes_csv.html
|
||||
|
||||
Thank you,
|
||||
Instructure".gsub(/^ +/, ''),
|
||||
delay_for: 0,
|
||||
|
@ -221,6 +223,8 @@ describe OutcomeImport, type: :model do
|
|||
Here are the first 100 errors that occurred:
|
||||
#{printed_errors}
|
||||
|
||||
To view the proper import format, please review the Canvas API Docs at http://localhost/doc/api/file.outcomes_csv.html
|
||||
|
||||
Thank you,
|
||||
Instructure".gsub(/^ +/, ''),
|
||||
delay_for: 0,
|
||||
|
|
Loading…
Reference in New Issue