Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
99c4413b
Commit
99c4413b
authored
Nov 10, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simply check for existing text and type.
parent
c550963f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
cms/static/js/models/xblock_validation.js
+2
-2
No files found.
cms/static/js/models/xblock_validation.js
View file @
99c4413b
...
@@ -18,10 +18,10 @@ define(["backbone", "gettext", "underscore"], function (Backbone, gettext, _) {
...
@@ -18,10 +18,10 @@ define(["backbone", "gettext", "underscore"], function (Backbone, gettext, _) {
if
(
!
response
.
empty
)
{
if
(
!
response
.
empty
)
{
var
summary
=
"summary"
in
response
?
response
.
summary
:
{};
var
summary
=
"summary"
in
response
?
response
.
summary
:
{};
var
messages
=
"messages"
in
response
?
response
.
messages
:
[];
var
messages
=
"messages"
in
response
?
response
.
messages
:
[];
if
(
!
(
_
.
has
(
summary
,
"text"
))
||
!
summary
.
text
)
{
if
(
!
summary
.
text
)
{
summary
.
text
=
gettext
(
"This component has validation issues."
);
summary
.
text
=
gettext
(
"This component has validation issues."
);
}
}
if
(
!
(
_
.
has
(
summary
,
"type"
))
||
!
summary
.
type
)
{
if
(
!
summary
.
type
)
{
summary
.
type
=
this
.
WARNING
;
summary
.
type
=
this
.
WARNING
;
// Possible types are ERROR, WARNING, and NOT_CONFIGURED. NOT_CONFIGURED is treated as a warning.
// Possible types are ERROR, WARNING, and NOT_CONFIGURED. NOT_CONFIGURED is treated as a warning.
_
.
find
(
messages
,
function
(
message
)
{
_
.
find
(
messages
,
function
(
message
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment