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
02c5d095
Commit
02c5d095
authored
Sep 16, 2014
by
Sola
Browse files
Options
Browse Files
Download
Plain Diff
merged to master
parents
e212b8a1
5941f291
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
10 deletions
+5
-10
crowdxblock/crowdxblock.py
+0
-0
crowdxblock/crowdxblock.py.orig
+0
-0
crowdxblock/static/js/src/crowdxblock.js
+4
-8
setup.py
+1
-2
No files found.
crowdxblock/crowdxblock.py
View file @
02c5d095
This diff is collapsed.
Click to expand it.
crowdxblock/crowdxblock.py.orig
0 → 100644
View file @
02c5d095
This diff is collapsed.
Click to expand it.
crowdxblock/static/js/src/crowdxblock.js
View file @
02c5d095
...
...
@@ -29,11 +29,6 @@ function CrowdXBlock(runtime, element){
HintUsed
=
[];
WrongAnswer
=
[];
repeating
=
0
;
$
.
ajax
({
type
:
"POST"
,
url
:
runtime
.
handlerUrl
(
element
,
'clear_temp'
),
data
:
JSON
.
stringify
({
"hello"
:
"world"
}),
});
}
Logger
.
listen
(
'problem_graded'
,
null
,
dostuff
);
...
...
@@ -136,7 +131,7 @@ function CrowdXBlock(runtime, element){
HintShown
.
push
(
index
);}
}
else
{
if
(
$
.
inArray
(
index
,
HintShown
)
==
-
1
){
console
.
log
(
'
YIESSSSS'
);
console
.
log
(
'
index is is'
+
indexid
);
$
(
'#hintstoshow'
+
valueid
).
prepend
(
"<p
\"
id =
\"
thisparagraph"
+
indexid
+
"
\"
>"
+
"<span style=
\"
display: inline-block;
\"
><input data-value=
\"
"
+
valueid
+
"
\"
id=
\"
"
+
indexid
+
"
\"
type=
\"
button
\"
style=
\"
padding-top: 3px;width:20px; height:35px;
\"
class=
\"
hintbutton
\"
data-rate=
\"
1
\"
value=
\"
^
\"
><input data-value=
\"
"
+
valueid
+
"
\"
id=
\"
"
+
indexid
+
"
\"
style=
\"
padding-top: 3px;width:20px; height:35px;
\"
type=
\"
button
\"
class=
\"
hintbutton
\"
data-rate=
\"
-1
\"
value=
\"
v
\"
><input data-value=
\"
"
+
valueid
+
"
\"
style=
\"
padding-top: 3px;width:20px; height:35px;
\"
id=
\"
"
+
indexid
+
"
\"
type=
\"
button
\"
class=
\"
hintbutton
\"
data-rate=
\"
0
\"
value=
\"
!
\"
></span><font color=
\"
blue
\"
>"
+
index
+
"</font></p>"
);
HintShown
.
push
(
index
);
}}}
else
{
...
...
@@ -202,7 +197,7 @@ function CrowdXBlock(runtime, element){
$
.
ajax
({
type
:
"POST"
,
url
:
runtime
.
handlerUrl
(
element
,
'rate_hint'
),
data
:
JSON
.
stringify
({
"student_rating"
:
$
(
this
).
attr
(
'data-rate'
),
"
answer"
:
$
(
this
).
attr
(
'id'
),
"value
"
:
$
(
this
).
attr
(
'data-value'
)}),
data
:
JSON
.
stringify
({
"student_rating"
:
$
(
this
).
attr
(
'data-rate'
),
"
used_hint"
:
$
(
this
).
attr
(
'id'
),
"student_answer
"
:
$
(
this
).
attr
(
'data-value'
)}),
success
:
finish
});})
...
...
@@ -211,7 +206,8 @@ 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
.
used_hint
);
console
.
log
(
idtouse
)
hint_rating
=
result
.
rating
;
if
(
result
.
rating
==
"zzeerroo"
){
hint_rating
=
0
;
...
...
setup.py
View file @
02c5d095
...
...
@@ -36,4 +36,4 @@ setup(
]
},
package_data
=
package_data
(
"crowdxblock"
,
[
"static"
,
"public"
]),
)
\ No newline at end of file
)
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