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-01-16 10:28:32 (GMT)
committer Tony Anderson <tony@traveler.(none)>2011-01-16 10:28:32 (GMT)
commitce456177de023ab72151a62f5e090e5545169666 (patch)
tree69ea3862920ae20688b0bc7feab89b74a1ac2421
parentdd479cbb0c93d39d219731b10e3a2f43945f2112 (diff)
version 11.5
-rwxr-xr-xactivity/activity.info2
-rwxr-xr-xcontent/js/global.js29
-rwxr-xr-xcontent/js/learner_lesson.js6
-rwxr-xr-xcontent/js/navigation.js1
-rwxr-xr-xcontent/js/subject.js5
5 files changed, 35 insertions, 8 deletions
diff --git a/activity/activity.info b/activity/activity.info
index 92f4a9b..1b25c4f 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,5 +1,5 @@
[Activity]
-#version = 11.4
+#version = 11.5
name = Learn
service_name = org.olerwanda.Learn
icon = activity-learn
diff --git a/content/js/global.js b/content/js/global.js
index e547138..8dcd7a5 100755
--- a/content/js/global.js
+++ b/content/js/global.js
@@ -16,13 +16,36 @@ function editreturn(){
});
}
function goback(){
- window.location = back;
+ url = window.location+"";
+ levels = url.split('/');
+ last = levels.pop();
+ levels.pop()
+ levels.push(last);
+ newurl = levels.join('/');
+ alert(newurl);
+ window.location = newurl
}
function gobackOne(){
- window.location = backOne;
+ url = window.location+"";
+ levels = url.split('/');
+ last = levels.pop();
+ levels.pop()
+ levels.pop()
+ levels.push(last);
+ newurl = levels.join('/');
+ alert(newurl);
+ window.location = newurl;
}
function gobackTwo(){
- window.location = backTwo;
+ url = window.location+"";
+ levels = url.split('/');
+ last = levels.pop();
+ levels.pop()
+ levels.pop()
+ levels.pop()
+ levels.push(last);
+ newurl = levels.join('/');
+ window.location = newurl;
}
function apply(){
items = (window.location+"").split('/');
diff --git a/content/js/learner_lesson.js b/content/js/learner_lesson.js
index 0ddfc88..6a7c23d 100755
--- a/content/js/learner_lesson.js
+++ b/content/js/learner_lesson.js
@@ -55,7 +55,11 @@ $(document).ready(
if (xy[3] == "EPaath"){
pth = "../../../src/FrameWork.html#" + xy[4];
}else if (xy[3] == "Karma"){
- pth = xy[4] + '/index.html';
+ if(xy[5]=='red'){
+ pth = xy[4] + '/index.html';
+ }else{
+ pth = xy[4] + '/index.html?F'+xy[0].substring(3);
+ };
}else if (xy[3] == 'NKarma'){
pth = xy[4] + '/index.html';
}else if (xy[3] == "Siyavula"){
diff --git a/content/js/navigation.js b/content/js/navigation.js
index 11cc5bd..f624199 100755
--- a/content/js/navigation.js
+++ b/content/js/navigation.js
@@ -1,5 +1,4 @@
$(document).ready(function(){
-
$('#linkBack').click(function(){
goback();
diff --git a/content/js/subject.js b/content/js/subject.js
index c670d79..259a7a3 100755
--- a/content/js/subject.js
+++ b/content/js/subject.js
@@ -54,17 +54,18 @@ $(document).ready(
if ( (x > xy[1]) && (x < xy[1] + cellsize) && (y < xy[2])
&& (y > xy[2] - cellsize) ) {
if (xy[5].indexOf('cyan')>-1) { //download
+ grade = xy[0].substring(3)
$('<div id="temp" />').load(
'http://localhost:8008/cgi-bin/fetch_milestone.py',
{'code':xy[0],'milestone':xy[4]},
function(responseText, status, xhr) {
//refresh when done
window.onunload=function(){return true;};
- window.location.reload(true);
+ window.location.xy[4]+'index.html?F'+xy[0].substring(3);
});
}else{ //go to activity
pth = xy[4]+'/index.html';
- window.location = pth+'?F';
+ window.location = pth+'?F'+xy[0].substring(3);
};
};
});