Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
87a929fb
Commit
87a929fb
authored
Apr 10, 2015
by
Kelketek
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from open-craft/notification
Added notifications for locking navigation on supported platforms.
parents
6db6db1a
d3c81f43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
problem_builder/public/js/mentoring_assessment_view.js
+10
-0
No files found.
problem_builder/public/js/mentoring_assessment_view.js
View file @
87a929fb
...
@@ -24,6 +24,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
...
@@ -24,6 +24,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
}
}
function
renderGrade
()
{
function
renderGrade
()
{
notify
(
'navigation'
,
{
state
:
'unlock'
})
var
data
=
$
(
'.grade'
,
element
).
data
();
var
data
=
$
(
'.grade'
,
element
).
data
();
cleanAll
();
cleanAll
();
$
(
'.grade'
,
element
).
html
(
gradeTemplate
(
data
));
$
(
'.grade'
,
element
).
html
(
gradeTemplate
(
data
));
...
@@ -48,6 +49,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
...
@@ -48,6 +49,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
return
;
return
;
active_child
=
-
1
;
active_child
=
-
1
;
notify
(
'navigation'
,
{
state
:
'lock'
})
displayNextChild
();
displayNextChild
();
tryAgainDOM
.
hide
();
tryAgainDOM
.
hide
();
submitDOM
.
show
();
submitDOM
.
show
();
...
@@ -66,6 +68,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
...
@@ -66,6 +68,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
}
}
function
initXBlockView
()
{
function
initXBlockView
()
{
notify
(
'navigation'
,
{
state
:
'lock'
})
submitDOM
=
$
(
element
).
find
(
'.submit .input-main'
);
submitDOM
=
$
(
element
).
find
(
'.submit .input-main'
);
nextDOM
=
$
(
element
).
find
(
'.submit .input-next'
);
nextDOM
=
$
(
element
).
find
(
'.submit .input-next'
);
reviewDOM
=
$
(
element
).
find
(
'.submit .input-review'
);
reviewDOM
=
$
(
element
).
find
(
'.submit .input-review'
);
...
@@ -103,6 +106,13 @@ function MentoringAssessmentView(runtime, element, mentoring) {
...
@@ -103,6 +106,13 @@ function MentoringAssessmentView(runtime, element, mentoring) {
return
(
active_child
==
mentoring
.
steps
.
length
);
return
(
active_child
==
mentoring
.
steps
.
length
);
}
}
function
notify
(
name
,
data
){
// Notification interface does not exist in the workbench.
if
(
runtime
.
notify
)
{
runtime
.
notify
(
name
,
data
)
}
}
function
displayNextChild
()
{
function
displayNextChild
()
{
cleanAll
();
cleanAll
();
...
...
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