Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schoolyourself-xblock
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
schoolyourself-xblock
Commits
2aee3a50
Commit
2aee3a50
authored
Nov 20, 2014
by
John Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow editing the base URL in studio
parent
ad11fa04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletions
+10
-1
schoolyourself/schoolyourself.py
+5
-1
schoolyourself/static/js/studio_view.js
+1
-0
schoolyourself/templates/studio_view.html
+4
-0
No files found.
schoolyourself/schoolyourself.py
View file @
2aee3a50
...
@@ -151,6 +151,7 @@ class SchoolYourselfXBlock(XBlock):
...
@@ -151,6 +151,7 @@ class SchoolYourselfXBlock(XBlock):
"module_title"
:
self
.
module_title
,
"module_title"
:
self
.
module_title
,
"module_description"
:
self
.
module_description
,
"module_description"
:
self
.
module_description
,
"shared_key"
:
self
.
shared_key
,
"shared_key"
:
self
.
shared_key
,
"base_url"
:
self
.
base_url
}
}
fragment
=
Fragment
(
self
.
render_template
(
"studio_view.html"
,
context
))
fragment
=
Fragment
(
self
.
render_template
(
"studio_view.html"
,
context
))
...
@@ -171,10 +172,13 @@ class SchoolYourselfXBlock(XBlock):
...
@@ -171,10 +172,13 @@ class SchoolYourselfXBlock(XBlock):
self
.
module_title
=
data
.
get
(
"module_title"
,
"Introduction"
)
self
.
module_title
=
data
.
get
(
"module_title"
,
"Introduction"
)
self
.
module_description
=
data
.
get
(
"module_description"
,
self
.
module_description
=
data
.
get
(
"module_description"
,
"Welcome to School Yourself!"
)
"Welcome to School Yourself!"
)
self
.
base_url
=
data
.
get
(
"base_url"
,
"https://schoolyourself.org"
)
if
"shared_key"
in
data
:
if
"shared_key"
in
data
:
self
.
shared_key
=
data
.
get
(
"shared_key"
)
self
.
shared_key
=
data
.
get
(
"shared_key"
)
return
{
"module_id"
:
self
.
module_id
,
return
{
"module_id"
:
self
.
module_id
,
"module_title"
:
self
.
module_title
,
"module_title"
:
self
.
module_title
,
"module_description"
:
self
.
module_description
,
"module_description"
:
self
.
module_description
,
"shared_key"
:
self
.
shared_key
}
"shared_key"
:
self
.
shared_key
,
"base_url"
:
self
.
base_url
}
schoolyourself/static/js/studio_view.js
View file @
2aee3a50
...
@@ -6,6 +6,7 @@ function SchoolYourselfStudioView(runtime, element) {
...
@@ -6,6 +6,7 @@ function SchoolYourselfStudioView(runtime, element) {
'module_description'
:
$
(
'.module-description'
,
element
).
val
(),
'module_description'
:
$
(
'.module-description'
,
element
).
val
(),
'player_type'
:
$
(
'.player-type'
,
element
).
val
(),
'player_type'
:
$
(
'.player-type'
,
element
).
val
(),
'shared_key'
:
$
(
'.shared-key'
,
element
).
val
(),
'shared_key'
:
$
(
'.shared-key'
,
element
).
val
(),
'base_url'
:
$
(
'.base-url'
,
element
).
val
()
};
};
var
handlerUrl
=
runtime
.
handlerUrl
(
element
,
'studio_submit'
);
var
handlerUrl
=
runtime
.
handlerUrl
(
element
,
'studio_submit'
);
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)).
complete
(
function
()
{
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)).
complete
(
function
()
{
...
...
schoolyourself/templates/studio_view.html
View file @
2aee3a50
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
</p>
</p>
<p>
<p>
Base URL:
<input
type=
"text"
class=
"base-url"
value=
"${base_url}"
/>
</p>
<p>
<button
class=
"save-button"
>
Save
</button>
<button
class=
"save-button"
>
Save
</button>
</p>
</p>
...
...
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