Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
081bdd92
Commit
081bdd92
authored
Jan 02, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GET -> POST
parent
844d506e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
index.html
+2
-2
main.html
+0
-1
problem.js
+4
-4
profile.html
+2
-2
No files found.
index.html
View file @
081bdd92
...
...
@@ -19,7 +19,7 @@ $(function() {
submit_data
[
value
.
name
]
=
value
.
checked
;
});
$
.
ge
tJSON
(
'/create_account'
,
pos
tJSON
(
'/create_account'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
...
...
@@ -39,7 +39,7 @@ $(function() {
submit_data
[
value
.
name
]
=
value
.
value
;
});
$
.
ge
tJSON
(
'/login'
,
pos
tJSON
(
'/login'
,
submit_data
,
function
(
json
)
{
if
(
json
.
success
)
{
...
...
main.html
View file @
081bdd92
...
...
@@ -25,7 +25,6 @@
</script>
<script
type=
"text/javascript"
src=
"/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"
></script>
</head>
<body>
...
...
problem.js
View file @
081bdd92
...
...
@@ -9,7 +9,7 @@ function ${ id }_load() {
$
.
each
(
$
(
"[id^=input_${ id }_]"
),
function
(
index
,
value
){
submit_data
[
value
.
id
]
=
value
.
value
;
});
$
.
ge
tJSON
(
'/modx/problem/${ id }/problem_check'
,
pos
tJSON
(
'/modx/problem/${ id }/problem_check'
,
submit_data
,
function
(
json
)
{
$
{
id
}
_load
();
...
...
@@ -23,14 +23,14 @@ function ${ id }_load() {
submit_data
[
value
.
id
]
=
value
.
value
;
});
$
.
ge
tJSON
(
'/modx/problem/${ id }/problem_reset'
,
{
'id'
:
'${ id }'
},
function
(
json
)
{
pos
tJSON
(
'/modx/problem/${ id }/problem_reset'
,
{
'id'
:
'${ id }'
},
function
(
json
)
{
$
{
id
}
_load
();
});
log_event
(
'problem_reset'
,
submit_data
);
});
$
(
'#show_${ id }'
).
click
(
function
()
{
$
.
ge
tJSON
(
'/modx/problem/${ id }/problem_show'
,
function
(
data
)
{
pos
tJSON
(
'/modx/problem/${ id }/problem_show'
,
function
(
data
)
{
for
(
var
key
in
data
)
{
$
(
"#answer_${ id }_"
+
key
).
text
(
data
[
key
]);
}
...
...
@@ -42,7 +42,7 @@ function ${ id }_load() {
var
submit_data
=
{};
$
.
each
(
$
(
"[id^=input_${ id }_]"
),
function
(
index
,
value
){
submit_data
[
value
.
id
]
=
value
.
value
;});
$
.
ge
tJSON
(
'/modx/problem/${ id }/problem_save'
,
pos
tJSON
(
'/modx/problem/${ id }/problem_save'
,
submit_data
,
function
(
data
){
if
(
data
.
success
)
{
alert
(
'Saved'
);
...
...
profile.html
View file @
081bdd92
...
...
@@ -17,7 +17,7 @@ $(function() {
$
(
"#location_sub"
).
html
(
'<input id="id_loc_text" type="text" name="loc_text" />'
+
'<input type="button" id="change_loc_button" value="Change" />'
);
$
(
"#change_loc_button"
).
click
(
function
()
{
$
.
ge
tJSON
(
'/change_setting'
,
{
'location'
:
$
(
"#id_loc_text"
).
attr
(
"value"
)},
function
(
json
)
{
pos
tJSON
(
'/change_setting'
,
{
'location'
:
$
(
"#id_loc_text"
).
attr
(
"value"
)},
function
(
json
)
{
$
(
"#location_sub"
).
text
(
json
.
location
);
loc
=
true
;
$
(
"#description"
).
html
(
""
);
...
...
@@ -35,7 +35,7 @@ $(function() {
$
(
"#language_sub"
).
html
(
'<input id="id_lang_text" type="text" name="lang_text" />'
+
'<input type="button" id="change_lang_button" value="Change" />'
);
$
(
"#change_lang_button"
).
click
(
function
()
{
$
.
ge
tJSON
(
'/change_setting'
,
{
'language'
:
$
(
"#id_lang_text"
).
attr
(
"value"
)},
function
(
json
)
{
pos
tJSON
(
'/change_setting'
,
{
'language'
:
$
(
"#id_lang_text"
).
attr
(
"value"
)},
function
(
json
)
{
$
(
"#language_sub"
).
text
(
json
.
language
);
lang
=
true
;
$
(
"#description"
).
html
(
""
);
...
...
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