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
2f578429
Commit
2f578429
authored
Nov 26, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix variable name formatting in JS files
parent
405b6014
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
static/js/mentoring.js
+5
-5
static/js/quizz.js
+7
-7
No files found.
static/js/mentoring.js
View file @
2f578429
function
MentoringBlock
(
runtime
,
element
)
{
var
progress
_t
emplate
=
_
.
template
(
$
(
'#xblock-progress-template'
).
html
());
var
progress
T
emplate
=
_
.
template
(
$
(
'#xblock-progress-template'
).
html
());
function
render
_p
rogress
()
{
function
render
P
rogress
()
{
var
data
=
$
(
'.progress'
,
element
).
data
();
$
(
'.indicator'
,
element
).
html
(
progress
_t
emplate
(
data
));
$
(
'.indicator'
,
element
).
html
(
progress
T
emplate
(
data
));
}
function
callIfExists
(
obj
,
fn
)
{
...
...
@@ -24,7 +24,7 @@ function MentoringBlock(runtime, element) {
});
$
(
'.progress'
,
element
).
data
(
'completed'
,
results
.
completed
?
'True'
:
'False'
)
render
_p
rogress
();
render
P
rogress
();
}
$
(
element
).
find
(
'.submit'
).
bind
(
'click'
,
function
()
{
...
...
@@ -40,5 +40,5 @@ function MentoringBlock(runtime, element) {
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)).
success
(
handleSubmitResults
);
});
render
_p
rogress
();
render
P
rogress
();
}
static/js/quizz.js
View file @
2f578429
function
QuizzBlock
(
runtime
,
element
)
{
return
{
submit
:
function
()
{
var
checked
_r
adio
=
$
(
'input[type=radio]:checked'
,
element
);
var
checked
R
adio
=
$
(
'input[type=radio]:checked'
,
element
);
if
(
checked
_r
adio
.
length
)
{
return
checked
_r
adio
.
val
();
if
(
checked
R
adio
.
length
)
{
return
checked
R
adio
.
val
();
}
else
{
return
null
;
}
},
handleSubmit
:
function
(
result
)
{
var
tips
_d
om
=
$
(
element
).
parent
().
find
(
'.quizz-tips'
),
tip
_h
tml
=
(
result
||
{}).
tip
||
''
;
var
tips
D
om
=
$
(
element
).
parent
().
find
(
'.quizz-tips'
),
tip
H
tml
=
(
result
||
{}).
tip
||
''
;
if
(
tip
_h
tml
)
{
tips
_dom
.
append
(
tip_h
tml
);
if
(
tip
H
tml
)
{
tips
Dom
.
append
(
tipH
tml
);
}
}
}
...
...
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