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
8d3352d2
Commit
8d3352d2
authored
Jul 31, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix feedback message display
parent
1105c899
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 @
8d3352d2
...
...
@@ -102,7 +102,7 @@ class MentoringBlock(XBlockWithLightChildren):
"""Compute the student score taking into account the light child weight."""
total_child_weight
=
sum
(
float
(
step
.
weight
)
for
step
in
self
.
steps
)
if
total_child_weight
==
0
:
return
(
0
,
0
,
0
)
return
(
0
,
0
,
0
,
0
)
score
=
sum
(
r
[
1
][
'score'
]
*
r
[
1
][
'weight'
]
\
for
r
in
self
.
student_results
)
/
total_child_weight
correct
=
sum
(
1
for
r
in
self
.
student_results
if
r
[
1
][
'completed'
]
==
True
)
...
...
mentoring/public/js/mentoring_standard_view.js
View file @
8d3352d2
...
...
@@ -23,6 +23,10 @@ function MentoringStandardView(runtime, element, mentoring) {
// Messages should only be displayed upon hitting 'submit', not on page reload
messagesDOM
.
append
(
results
.
message
);
var
template
=
$
(
'#light-child-template'
,
messagesDOM
).
html
();
if
(
template
)
{
messagesDOM
.
append
(
template
);
}
if
(
messagesDOM
.
html
().
trim
())
{
messagesDOM
.
prepend
(
'<div class="title1">Feedback</div>'
);
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