コード例 #1
0
require_once "/var/www/html/jimfuqua/tutor/lessons/test_lesson_include.php";
// $log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_one_digit_addition_vertical_clues.log', 'w');
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_one_digit_addition_vertical_clues';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_one_digit_addition_vertical_clues');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'one_digit_addition_vertical_clues.php';
コード例 #2
0
require_once "/var/www/html/jimfuqua/tutor/lessons/test_lesson_include.php";
//$log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_horizontal_vertical_diagonal.php.log', 'w');
//$v = var_export($_SESSION, true);
//$string = __LINE__.' $_SESSION = '.$v."\n\n";
//fwrite($log_file, $string);
$target_assignment_name = 'gA_horizontal_vertical_diagonal';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_horizontal_vertical_diagonal');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'horizontal_vertical_diagonal.php';
コード例 #3
0
require_once "/var/www/html/jimfuqua/tutor/lessons/test_lesson_include.php";
// $log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_GearsRotationDirection.log', 'w');
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_GearsRotationDirection';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_GearsRotationDirection');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'GearsRotationDirection.php';
コード例 #4
0
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_left_right_blocks';
require_once '../../src/classes/AssignmentsClass.inc';
$class_instance = new \tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
//echo (90."<br/>");
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_left_right_blocks');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'left_right_blocks.php';
//echo ("114"."<br/>");
コード例 #5
0
ファイル: AssignmentsTest.php プロジェクト: thornview/tutorW
 /**
  *   Test delRowsByStudentId_AssignmentName()
  * @return void
  */
 public function testdelRowsByStudentId_AssignmentName()
 {
     $this->testbuildArray();
     $tempStudent = 'abcdefg';
     $tempAssignmentName = 'hijklmn';
     $this->myArray['tA_S_ID'] = $tempStudent;
     $this->myArray['tG_AssignmentName'] = $tempAssignmentName;
     $classInstance = new tutor\src\classes\AssignmentsClass();
     // Next insure no previous lessons for this student.
     $classInstance->delRowsByStudentId($tempStudent);
     $this->assertTrue(isset($classInstance));
     $result = $classInstance->insertRecord($this->myArray);
     $this->assertTrue($result === 1);
     $this->assertTrue(isset($classInstance));
     // Now delete the row.
     $result = $classInstance->delRowsByStudentId_AssignmentName($tempStudent, $tempAssignmentName);
     $result = $this->assertTrue($result === 1);
     // Now try deleting the row again  -- should not be one to delete.
     $result = $classInstance->delRowsByStudentId($tempStudent);
     $this->assertTrue($result === 0);
 }
コード例 #6
0
// $log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_typing_lessons_cl.log', 'w');
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_typing_lessons_cl';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_typing_lessons_cl');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + ($_SESSION['tA_StartRec'] = 2);
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
include 'typing_lessons_cl.php';
//echo __LINE__ . "<br>";
コード例 #7
0
require_once "/var/www/html/jimfuqua/tutor/lessons/test_lesson_include.php";
// $log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_clockwise_counterclockwise.log', 'w');
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_clockwise_counterclockwise';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_clockwise_counterclockwise');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'clockwise_counterclockwise.php';
コード例 #8
0
ファイル: test_spelling.php プロジェクト: thornview/tutorW
// $log_file = fopen('/var/www/html/jimfuqua/tutor/logs/test_Spelling.log', 'w');
// $v = var_export($_SESSION, true);
// $string = __LINE__.' $_SESSION = '.$v."\n\n";
// fwrite($log_file, $string);
$target_assignment_name = 'gA_spelling';
require_once '/var/www/html/jimfuqua/tutor/src/classes/AssignmentsClass.inc';
$class_instance = new tutor\src\classes\AssignmentsClass();
// Get target lesson if it exists.
$result = $class_instance->getSpecificStudentAssignmentFromDbAsArray($_SESSION['tA_S_ID'], $target_assignment_name, $_SESSION['tA_StartRec']);
$_SESSION['tA_id'] = $result['tA_id'];
// $v = var_export($_SESSION['tA_id'], true);
// $string = __LINE__.' $_SESSION["tA_id"] = '.$v."\n\n";
// fwrite($log_file, $string);
// Remove the lesson to be tested.
// Add it back with a 2 second post-date.
//
$class_instance->delRowsByStudentId_AssignmentName($_SESSION['tA_S_ID'], 'gA_spelling');
$_SESSION['tG_AssignmentName'] = $target_assignment_name;
$_SESSION['tA_PostDateIncrement'] = 2;
$_SESSION['tA_Post_date'] = round(microtime(true), 3, PHP_ROUND_HALF_EVEN) + $_SESSION['tA_PostDateIncrement'];
$_SESSION['lesson_id'] = 2;
// $string = __LINE__.' $_SESSION["tA_Post_date"] = '.$_SESSION['tA_Post_date']."\n\n";
// fwrite($log_file, $string);
// $s = ' round(microtime(true), 3, PHP_ROUND_HALF_EVEN) = ';
// $string =  __LINE__. $s . round(microtime(true), 3, PHP_ROUND_HALF_EVEN)."\n\n";
// fwrite($log_file, $string);
$result = $class_instance->insertRecord($_SESSION);
// insert the target lesson and get back the tA_id.
// now get back the tA_id for the target lesson.  Get by assignment_name
// $result = $class_instance->insertRecord($var_array);
require 'spelling.php';