Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Save_Mathematics/P4/map412m05/map412m05a03/js/lesson.js
diff options
context:
space:
mode:
Diffstat (limited to 'Save_Mathematics/P4/map412m05/map412m05a03/js/lesson.js')
-rwxr-xr-xSave_Mathematics/P4/map412m05/map412m05a03/js/lesson.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/Save_Mathematics/P4/map412m05/map412m05a03/js/lesson.js b/Save_Mathematics/P4/map412m05/map412m05a03/js/lesson.js
deleted file mode 100755
index b81678a..0000000
--- a/Save_Mathematics/P4/map412m05/map412m05a03/js/lesson.js
+++ /dev/null
@@ -1,40 +0,0 @@
-function generate_decimal(min,max) {
- n = Math.random()*(max-min)+min;
- ntxt = n + ' ';
- point = ntxt.indexOf('.');
- whole = ntxt.substring(0,point-1)
- decimal = ntxt.substring(point+1,point+4)
- return whole + '.' + decimal;
-};
-
-function generate_opportunity(questions){
- //build quiz.js
- quiztxt = '';
- for (q=0;q<questions;q++){
- op1 = generate_decimal(.001,999.999);
- op2 = generate_decimal(.001,999.999);
- quotient = (parseFloat(op1) / parseFloat(op2)).toFixed(6);
- quiztxt = quiztxt + "{ques:'"+op1+" / "+op2+"=', ans:'"+quotient+"'},\n"
- };
- return quiztxt;
-};
-
-function initialize(karma) {
- quiztxt = generate_opportunity(12);
- url = window.location + "";
- $('<div id="txtMain" />')
- .load('http://localhost:8008/cgi-bin/getFile.py',
- {'filename':'content/Mathematics/map412m05/map412m05a03/a.txt'})
- .appendTo('#content');
- $('<div id="workArea" />')
- .load('http://localhost:8008/cgi-bin/writeQuiz.py',
- {'activity':url,'text': quiztxt});
-};
-
-function startGame(karma) {
- $('<div id="quizArea" />')
- .appendTo('#content')
- .jQuizMe(quiz,options)
-};
-
-setUpLesson(initialize, startGame);