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
7d794f08
Commit
7d794f08
authored
Mar 19, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from aboudreault/incomplete-mark
Added an incomplete mark indicator
parents
1ae6aab7
fcb41c42
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
4 deletions
+17
-4
mentoring/mentoring.py
+1
-0
mentoring/public/css/mentoring.css
+10
-1
mentoring/public/js/mentoring.js
+2
-1
mentoring/templates/html/mentoring.html
+1
-1
mentoring/templates/html/mentoring_progress.html
+3
-1
No files found.
mentoring/mentoring.py
View file @
7d794f08
...
...
@@ -139,6 +139,7 @@ class MentoringBlock(XBlockWithLightChildren):
return
{
'submitResults'
:
submit_results
,
'completed'
:
self
.
completed
,
'attempted'
:
self
.
attempted
,
'message'
:
message
,
}
...
...
mentoring/public/css/mentoring.css
View file @
7d794f08
...
...
@@ -49,6 +49,15 @@
margin-top
:
20px
;
}
.mentoring
.progress
.indicator
.checkmark
{
.mentoring
.progress
.indicator
{
display
:
inline-block
;
margin-top
:
5px
;
}
.mentoring
.progress
.indicator
.checkmark-correct
{
color
:
#006600
;
}
.mentoring
.progress
.indicator
.checkmark-incorrect
{
color
:
#ff0000
;
}
mentoring/public/js/mentoring.js
View file @
7d794f08
...
...
@@ -34,7 +34,8 @@ function MentoringBlock(runtime, element) {
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
();
// Messages should only be displayed upon hitting 'submit', not on page reload
...
...
mentoring/templates/html/mentoring.html
View file @
7d794f08
...
...
@@ -9,7 +9,7 @@
{% if self.display_submit %}
<div
class=
"submit"
>
<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>
</div>
...
...
mentoring/templates/html/mentoring_progress.html
View file @
7d794f08
<script
type=
"text/template"
id=
"xblock-progress-template"
>
<%
if
(
completed
===
"True"
)
{{
%>
<
i
class
=
"icon-ok icon-2x checkmark"
><
/i
>
<
i
class
=
"icon-ok icon-2x checkmark-correct"
><
/i
>
<%
}}
else
if
(
attempted
===
"True"
)
{{
%>
<
i
class
=
"icon-exclamation icon-2x checkmark-incorrect"
><
/i
>
<%
}}
%>
</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