Skip to content

Commit

Permalink
Update main integrations folder with Google Sites integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlip committed Jun 6, 2015
1 parent ab28066 commit c33eac7
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 7 deletions.
17 changes: 17 additions & 0 deletions integrations/google_sites_20150606_v0.0.0/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Embedding Oppia explorations in a Google Sites page Version 0.0.0
---------------------------------------------------

On the Sites page, select:

'Insert' -> 'More Gadgets' -> 'Add gadget by URL'

and add the following URL [*]:

https://oppia.googlecode.com/git-history/v2.0.0.rc.3/integrations/google_sites_20150606_v0.0.0/gadget.xml

Then, enter values for the exploration ID and the Oppia base server URL, and
select 'OK'.

[*] WARNING: The above URL may change over time. If you want this URL to be
stable, you can download the XML file from integrations/google_sites/gadget.xml
and host it somewhere, then point to it.
9 changes: 6 additions & 3 deletions integrations_dev/build_new_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
import shutil

INTEGRATION_NAME_GCB_OPPIA_TAG = 'gcb_oppia_tag'
INTEGRATION_NAME_GOOGLE_SITES = 'google_sites'
INTEGRATION_NAME_OPPIA_PLAYER = 'oppia_player'
ALLOWED_INTEGRATION_NAMES = [
INTEGRATION_NAME_GCB_OPPIA_TAG,
INTEGRATION_NAME_GOOGLE_SITES,
INTEGRATION_NAME_OPPIA_PLAYER
]

Expand Down Expand Up @@ -126,9 +128,10 @@
'coursebuilder', 'modules', 'oppia_tag', 'resources'),
INTEGRATION_NAME_OPPIA_PLAYER: '.',
}
shutil.copy(
SCRIPT_FILEPATH,
os.path.join(TARGET_DIR, SCRIPT_LOCATIONS[INTEGRATION_NAME]))
if INTEGRATION_NAME in SCRIPT_LOCATIONS:
shutil.copy(
SCRIPT_FILEPATH,
os.path.join(TARGET_DIR, SCRIPT_LOCATIONS[INTEGRATION_NAME]))

print ''
print 'Done! Please check %s for the release candidate.' % TARGET_DIR
Expand Down
4 changes: 0 additions & 4 deletions integrations_dev/exploration_gadget/README

This file was deleted.

17 changes: 17 additions & 0 deletions integrations_dev/google_sites/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Embedding Oppia explorations in a Google Sites page Version {{VERSION}}
---------------------------------------------------

On the Sites page, select:

'Insert' -> 'More Gadgets' -> 'Add gadget by URL'

and add the following URL [*]:

https://oppia.googlecode.com/git-history/v2.0.0.rc.3/integrations/google_sites_{{DATE}}_v{{VERSION}}/gadget.xml

Then, enter values for the exploration ID and the Oppia base server URL, and
select 'OK'.

[*] WARNING: The above URL may change over time. If you want this URL to be
stable, you can download the XML file from integrations/google_sites/gadget.xml
and host it somewhere, then point to it.
24 changes: 24 additions & 0 deletions integrations_dev/google_sites/gadget.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Module>
<ModulePrefs title="Oppia Gadget" height="800" width="600" author="Google">
<Require feature="dynamic-height"/>
</ModulePrefs>
<UserPref name="explorationId" display_name="Exploration ID" />
<UserPref name="serverBaseUrl" display_name="Oppia Server Base URL" default_value="https://www.oppia.org" />
<Content type="html">
<![CDATA[
<script src="//cdn.jsdelivr.net/oppia/0.0.1/oppia-player.min.js"></script>
<oppia id="oppiaTag" oppia-id="" src=""></oppia>
<script type="text/javascript">
var prefs = new gadgets.Prefs();
function loadGadget() {
var element = document.getElementById('oppiaTag');
element.setAttribute('oppia-id', prefs.getString('explorationId'));
element.setAttribute('src', prefs.getString('serverBaseUrl'));
}
gadgets.util.registerOnLoadHandler(loadGadget);
</script>
]]>
</Content>
</Module>

0 comments on commit c33eac7

Please sign in to comment.