Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Anderson <tony@traveler.(none)>2011-03-27 07:32:45 (GMT)
committer Tony Anderson <tony@traveler.(none)>2011-03-27 07:32:45 (GMT)
commiteed892db7cd85872c629af5e70e86375116a5498 (patch)
treea9b7a9d2867b5676b39f64930f8ed7ab88a237e4
parent311b170b59299a77d7cccdd46853a97d98c4fcb2 (diff)
version 12.14
-rwxr-xr-xactivity/activity.info2
-rwxr-xr-xcgi-bin/fetchFile.py6
-rwxr-xr-xcgi-bin/saveFile.py8
-rwxr-xr-xcontentedit.html8
4 files changed, 13 insertions, 11 deletions
diff --git a/activity/activity.info b/activity/activity.info
index f9bbe7c..4c63c1b 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,5 +1,5 @@
[Activity]
-#version = 12.13
+#version = 12.14
name = Learn
service_name = rw.olpc.Learn
icon = activity-learn
diff --git a/cgi-bin/fetchFile.py b/cgi-bin/fetchFile.py
index 8c9a771..dabaec9 100755
--- a/cgi-bin/fetchFile.py
+++ b/cgi-bin/fetchFile.py
@@ -13,9 +13,9 @@ fpth = path(f)
print >> log, 'f=', fpth
srcpth = fpth.parent
print >> log, 'srcpth=', srcpth
-fpth = srcpth / 'source.txt'
-print >> log, 'f=',fpth, srcpth, fpth
-fin = open(fpth, 'r')
+fullpth = srcpth / 'source.txt'
+print >> log, 'fullpth=',fullpth
+fin = open(fullpth, 'r')
txt = fin.read()
fin.close()
print >> log, 'make soup', len(txt)
diff --git a/cgi-bin/saveFile.py b/cgi-bin/saveFile.py
index 77daede..cf0c4e8 100755
--- a/cgi-bin/saveFile.py
+++ b/cgi-bin/saveFile.py
@@ -260,7 +260,7 @@ else:
for s in range(len(screens)):
lessontxt = lessontxt + " generateScreen" + str(s+1) + ",\n"
lessontxt = lessontxt + "]);\n"
-lpth = fpth / 'js' / 'lesson.js'
+lpth = fpth / 'lesson.js'
fout = open(lpth, 'w')
fout.write(lessontxt)
fout.close()
@@ -268,7 +268,7 @@ fout.close()
#write quiz.js, if necessary
print >> log, 'write quiz.js if necessary', len(quiztxtout)
if len(quiztxtout) > 0:
- qpth = fpth / 'js' / 'quiz.js'
+ qpth = fpth / 'quiz.js'
fout = open(qpth,'w')
fout.write(quiztxtout)
fout.close()
@@ -299,7 +299,7 @@ if len(masterimagelist) > 0:
#write txtout
txtout = txtout+'#I'+imgn+'{height: '+height+'px; width: '+width+'px;}\n'
#write file
- pth = fpth/ 'css' / 'lesson.css'
+ pth = fpth / 'lesson.css'
fout = open(pth,'w')
fout.write(txtout)
fout.close()
@@ -329,7 +329,7 @@ txtlk = ' return Karma({\n' +txtlk
txtlk = 'function lesson_karma() {\n' + txtlk
txtlk = txtlk + ' });\n}\n'
#write file
-pth = fpth/ 'js' / 'lesson-karma.js'
+pth = fpth / 'lesson-karma.js'
fout = open(pth,'w')
fout.write(txtlk)
fout.close()
diff --git a/contentedit.html b/contentedit.html
index 9e18f83..a439b42 100755
--- a/contentedit.html
+++ b/contentedit.html
@@ -12,9 +12,12 @@ host = 'http://localhost:8008/'
url = window.location+'';
parts = url.split('?');
parts.shift();
-openfile = parts[0];
-items = openfile.split('/');
+temp = parts[0];
+items = temp.split('/');
items.pop();
+items.shift();
+items.shift();
+items.shift();
openfolder = items.join('/')+'/';
openfile = openfolder + 'source.txt';
tinyMCE.init({
@@ -39,7 +42,6 @@ $(document).ready(function(){
{'openfile':openfile},
function(responseTxt, status, xhr){
$('#cntnt').text(responseTxt);
- alert($('#content').html());
});
});