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
fcb41c42
Commit
fcb41c42
authored
Mar 19, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use attempted attribute for the mark
parent
607a17e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
mentoring/mentoring.py
+1
-0
mentoring/public/js/mentoring.js
+2
-5
mentoring/templates/html/mentoring.html
+1
-1
mentoring/templates/html/mentoring_progress.html
+1
-1
No files found.
mentoring/mentoring.py
View file @
fcb41c42
...
@@ -139,6 +139,7 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -139,6 +139,7 @@ class MentoringBlock(XBlockWithLightChildren):
return
{
return
{
'submitResults'
:
submit_results
,
'submitResults'
:
submit_results
,
'completed'
:
self
.
completed
,
'completed'
:
self
.
completed
,
'attempted'
:
self
.
attempted
,
'message'
:
message
,
'message'
:
message
,
}
}
...
...
mentoring/public/js/mentoring.js
View file @
fcb41c42
...
@@ -34,7 +34,8 @@ function MentoringBlock(runtime, element) {
...
@@ -34,7 +34,8 @@ function MentoringBlock(runtime, element) {
callIfExists
(
child
,
'handleSubmit'
,
result
);
callIfExists
(
child
,
'handleSubmit'
,
result
);
});
});
$
(
'.progress'
,
element
).
data
(
'completed'
,
results
.
completed
?
'True'
:
'False'
)
$
(
'.progress'
,
element
).
data
(
'completed'
,
results
.
completed
?
'True'
:
'False'
);
$
(
'.progress'
,
element
).
data
(
'attempted'
,
results
.
attempted
?
'True'
:
'False'
);
renderProgress
();
renderProgress
();
// Messages should only be displayed upon hitting 'submit', not on page reload
// Messages should only be displayed upon hitting 'submit', not on page reload
...
@@ -89,10 +90,6 @@ function MentoringBlock(runtime, element) {
...
@@ -89,10 +90,6 @@ function MentoringBlock(runtime, element) {
});
});
if
(
submit_dom
.
length
)
{
if
(
submit_dom
.
length
)
{
/* On page load, remove the incomplete mark */
if
(
$
(
'.progress'
,
element
).
data
(
'completed'
)
===
"False"
)
$
(
'.progress'
,
element
).
data
(
'completed'
,
null
)
renderProgress
();
renderProgress
();
}
}
...
...
mentoring/templates/html/mentoring.html
View file @
fcb41c42
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
{% if self.display_submit %}
{% if self.display_submit %}
<div
class=
"submit"
>
<div
class=
"submit"
>
<input
type=
"button"
value=
"Submit"
></input>
<input
type=
"button"
value=
"Submit"
></input>
<span
class=
"progress"
data-completed=
"{{ self.completed }}"
>
<span
class=
"progress"
data-completed=
"{{ self.completed }}"
data-attempted=
"{{ self.attempted }}"
>
<span
class=
'indicator'
></span>
<span
class=
'indicator'
></span>
</span>
</span>
</div>
</div>
...
...
mentoring/templates/html/mentoring_progress.html
View file @
fcb41c42
<script
type=
"text/template"
id=
"xblock-progress-template"
>
<script
type=
"text/template"
id=
"xblock-progress-template"
>
<%
if
(
completed
===
"True"
)
{{
%>
<%
if
(
completed
===
"True"
)
{{
%>
<
i
class
=
"icon-ok icon-2x checkmark-correct"
><
/i
>
<
i
class
=
"icon-ok icon-2x checkmark-correct"
><
/i
>
<%
}}
else
if
(
completed
===
"Fals
e"
)
{{
%>
<%
}}
else
if
(
attempted
===
"Tru
e"
)
{{
%>
<
i
class
=
"icon-exclamation icon-2x checkmark-incorrect"
><
/i
>
<
i
class
=
"icon-exclamation icon-2x checkmark-incorrect"
><
/i
>
<%
}}
%>
<%
}}
%>
</script>
</script>
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