Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crowdsourcehinter
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
crowdsourcehinter
Commits
010d2def
Commit
010d2def
authored
Sep 14, 2014
by
Sola
Committed by
Piotr Mitros
Oct 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed variable names
parent
ffeeddc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
crowdxblock/crowdxblock.py
+3
-3
crowdxblock/static/js/src/crowdxblock.js
+1
-1
No files found.
crowdxblock/crowdxblock.py
View file @
010d2def
...
...
@@ -261,11 +261,11 @@ class CrowdXBlock(XBlock):
rating
=
self
.
change_rating
(
data_hint
,
int
(
data_rating
),
answer_data
)
# change hint rating
if
str
(
rating
)
==
str
(
0
):
# if the rating is "0", return "zzeerroo" instead. "0" showed up as "null" in JS
return
{
"rating"
:
str
(
'zzeerroo'
),
'
origdata
'
:
original_data
}
return
{
"rating"
:
str
(
'zzeerroo'
),
'
student_answer
'
:
original_data
}
else
:
return
{
"rating"
:
str
(
rating
),
'
origdata
'
:
original_data
}
return
{
"rating"
:
str
(
rating
),
'
student_answer
'
:
original_data
}
else
:
return
{
"rating"
:
str
(
'You have already voted on this hint!'
),
'
origdata
'
:
original_data
}
return
{
"rating"
:
str
(
'You have already voted on this hint!'
),
'
student_answer
'
:
original_data
}
def
hint_flagged
(
self
,
data_hint
,
answer_data
):
"""
...
...
crowdxblock/static/js/src/crowdxblock.js
View file @
010d2def
...
...
@@ -206,7 +206,7 @@ function CrowdXBlock(runtime, element){
if
(
canhint
==
0
){
canhint
=
1
;
$
(
'.Thankyou'
,
element
).
text
(
"Thankyou for your help!"
);
idtouse
=
String
(
'thisparagraph'
+
result
.
origdata
);
idtouse
=
String
(
'thisparagraph'
+
result
.
student_answer
);
hint_rating
=
result
.
rating
;
if
(
result
.
rating
==
"zzeerroo"
){
hint_rating
=
0
;
...
...
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