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
085f008f
Commit
085f008f
authored
Jul 31, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #53 from aboudreault/assessment-fixes
Fix feedback message display
parents
5b8531f0
8d3352d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
mentoring/mentoring.py
+1
-1
mentoring/public/js/mentoring_standard_view.js
+4
-0
No files found.
mentoring/mentoring.py
View file @
085f008f
...
@@ -104,7 +104,7 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -104,7 +104,7 @@ class MentoringBlock(XBlockWithLightChildren):
"""Compute the student score taking into account the light child weight."""
"""Compute the student score taking into account the light child weight."""
total_child_weight
=
sum
(
float
(
step
.
weight
)
for
step
in
self
.
steps
)
total_child_weight
=
sum
(
float
(
step
.
weight
)
for
step
in
self
.
steps
)
if
total_child_weight
==
0
:
if
total_child_weight
==
0
:
return
(
0
,
0
,
0
)
return
(
0
,
0
,
0
,
0
)
score
=
sum
(
r
[
1
][
'score'
]
*
r
[
1
][
'weight'
]
\
score
=
sum
(
r
[
1
][
'score'
]
*
r
[
1
][
'weight'
]
\
for
r
in
self
.
student_results
)
/
total_child_weight
for
r
in
self
.
student_results
)
/
total_child_weight
correct
=
sum
(
1
for
r
in
self
.
student_results
if
r
[
1
][
'completed'
]
==
True
)
correct
=
sum
(
1
for
r
in
self
.
student_results
if
r
[
1
][
'completed'
]
==
True
)
...
...
mentoring/public/js/mentoring_standard_view.js
View file @
085f008f
...
@@ -23,6 +23,10 @@ function MentoringStandardView(runtime, element, mentoring) {
...
@@ -23,6 +23,10 @@ function MentoringStandardView(runtime, element, mentoring) {
// Messages should only be displayed upon hitting 'submit', not on page reload
// Messages should only be displayed upon hitting 'submit', not on page reload
messagesDOM
.
append
(
results
.
message
);
messagesDOM
.
append
(
results
.
message
);
var
template
=
$
(
'#light-child-template'
,
messagesDOM
).
html
();
if
(
template
)
{
messagesDOM
.
append
(
template
);
}
if
(
messagesDOM
.
html
().
trim
())
{
if
(
messagesDOM
.
html
().
trim
())
{
messagesDOM
.
prepend
(
'<div class="title1">Feedback</div>'
);
messagesDOM
.
prepend
(
'<div class="title1">Feedback</div>'
);
messagesDOM
.
show
();
messagesDOM
.
show
();
...
...
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