";
echo ""
@@ -2055,7 +2060,7 @@ class TrackingUserLogCSV {
*/
function display_exercise_tracking_info($view, $user_id, $course_id)
{
- global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES, $TABLETRACK_HOTPOTATOES;
+ global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES, $TABLETRACK_HOTPOTATOES, $dateTimeFormatLong;
if(substr($view,1,1) == '1')
{
$new_view = substr_replace($view,'0',1,1);
@@ -2087,7 +2092,7 @@ class TrackingUserLogCSV {
{
for($i = 0; $i < sizeof($results); $i++)
{
- $display_date = format_locale_date(get_lang('dateTimeFormatLong'), $results[$i][3]);
+ $display_date = api_get_local_time($results[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
$line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
}
}
@@ -2105,8 +2110,9 @@ class TrackingUserLogCSV {
if ($title == '')
$title = basename($hpresults[$i][0]);
+
+ $display_date = api_get_local_time($hpresults[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
- $display_date = format_locale_date(get_lang('dateTimeFormatLong'), $hpresults[$i][3]);
$line .= $title.';'.$display_date.';'.$hpresults[$i][1].'/'.$hpresults[$i][2]."\n";
}
}
@@ -2155,7 +2161,8 @@ class TrackingUserLogCSV {
for($j = 0 ; $j < count($results) ; $j++)
{
$pathToFile = api_get_path(WEB_COURSE_PATH).$_course['path']."/".$results[$j][3];
- $timestamp = strtotime($results[$j][0]);
+ $upload_date = api_get_local_time($results[$j][0], null, null, date_default_timezone_get());
+ $timestamp = strtotime($upload_date);
$beautifulDate = format_locale_date($dateTimeFormatLong,$timestamp);
$line .= $results[$j][1].";".$results[$j][2].";".$beautifulDate."\n";
}
@@ -2252,4 +2259,4 @@ class TrackingUserLogCSV {
return array($title_line, $line);
}
}
-?>
\ No newline at end of file
+?>
diff --git a/main/wiki/index.php b/main/wiki/index.php
index dd04903ed6..99b83f9e51 100755
--- a/main/wiki/index.php
+++ b/main/wiki/index.php
@@ -1362,7 +1362,7 @@ if ($_GET['action']=='edit')
//check tasks
if (!empty($row['startdate_assig']) && $row['startdate_assig']!='0000-00-00 00:00:00' && time()strtotime($row['enddate_assig']) && $row['enddate_assig']!='0000-00-00 00:00:00' && $row['delayedsubmit']==0)
{
- $message=get_lang('TheDeadlineHasBeenCompleted').': '.$row['enddate_assig'];
+ $message=get_lang('TheDeadlineHasBeenCompleted').': '.api_get_local_time($row['enddate_assig'], null, null, date_default_timezone_get());
Display::display_warning_message($message);
if(!api_is_allowed_to_edit(false,true))
{
@@ -1414,7 +1414,7 @@ if ($_GET['action']=='edit')
}
else
{
- $message_task_startdate=$row['startdate_assig'];
+ $message_task_startdate=api_get_local_time($row['startdate_assig'], null, null, date_default_timezone_get());
}
if ($row['enddate_assig']=='0000-00-00 00:00:00')
@@ -1423,7 +1423,7 @@ if ($_GET['action']=='edit')
}
else
{
- $message_task_endate=$row['enddate_assig'];
+ $message_task_endate=api_get_local_time($row['enddate_assig'], null, null, date_default_timezone_get());
}
if ($row['delayedsubmit']==0)
@@ -1767,13 +1767,6 @@ if ($_GET['action']=='history' or Security::remove_XSS($_POST['HistoryDifference
{
$userinfo=Database::get_user_info_from_id($row['user_id']);
- $year = substr($row['dtime'], 0, 4);
- $month = substr($row['dtime'], 5, 2);
- $day = substr($row['dtime'], 8, 2);
- $hours=substr($row['dtime'], 11,2);
- $minutes=substr($row['dtime'], 14,2);
- $seconds=substr($row['dtime'], 17,2);
-
echo '';
($counter==0) ? $oldstyle='style="visibility: hidden;"':$oldstyle='';
($counter==0) ? $newchecked=' checked':$newchecked='';
@@ -1784,7 +1777,7 @@ if ($_GET['action']=='history' or Security::remove_XSS($_POST['HistoryDifference
echo '';
echo '';
- echo $year.'-'.$month.'-'.$day.' '.$hours.":".$minutes.":".$seconds;
+ echo api_get_local_time($row['dtime'], null, null, date_default_timezone_get());
echo '';
echo ' ('.get_lang('Version').' '.$row['version'].')';
echo ' '.get_lang('By').' ';
@@ -1957,14 +1950,6 @@ if ($_GET['action']=='recentchanges')
//get author
$userinfo=Database::get_user_info_from_id($obj->user_id);
- //get time
- $year = substr($obj->dtime, 0, 4);
- $month = substr($obj->dtime, 5, 2);
- $day = substr($obj->dtime, 8, 2);
- $hours = substr($obj->dtime, 11,2);
- $minutes = substr($obj->dtime, 14,2);
- $seconds = substr($obj->dtime, 17,2);
-
//get type assignment icon
if($obj->assignment==1)
{
@@ -1991,7 +1976,7 @@ if ($_GET['action']=='recentchanges')
$row = array ();
- $row[] = $year.'-'.$month.'-'.$day.' '.$hours.':'.$minutes.":".$seconds;
+ $row[] = api_get_local_time($obj->dtime, null, null, date_default_timezone_get());
$row[] = $ShowAssignment.$icon_task;
$row[] = ''.$obj->title.'';
$row[] = $obj->version>1 ? get_lang('EditedBy') : get_lang('AddedBy');
@@ -2047,14 +2032,6 @@ if ($_GET['action']=='allpages')
//get author
$userinfo=Database::get_user_info_from_id($obj->user_id);
- //get time
- $year = substr($obj->dtime, 0, 4);
- $month = substr($obj->dtime, 5, 2);
- $day = substr($obj->dtime, 8, 2);
- $hours = substr($obj->dtime, 11,2);
- $minutes = substr($obj->dtime, 14,2);
- $seconds = substr($obj->dtime, 17,2);
-
//get type assignment icon
if($obj->assignment==1)
{
@@ -2083,7 +2060,7 @@ if ($_GET['action']=='allpages')
$row[] =$ShowAssignment.$icon_task;
$row[] = ''.Security::remove_XSS($obj->title).'';
$row[] = $obj->user_id <>0 ? ''.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'' : get_lang('Anonymous').' ('.$obj->user_ip.')';
- $row[] = $year.'-'.$month.'-'.$day.' '.$hours.":".$minutes.":".$seconds;
+ $row[] = api_get_local_time($obj->dtime, null, null, date_default_timezone_get());
if(api_is_allowed_to_edit(false,true)|| api_is_platform_admin())
{
@@ -2125,7 +2102,7 @@ if ($_GET['action']=='discuss')
$sql='SELECT * FROM '.$tbl_wiki.'WHERE reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$groupfilter.$condition_session.' ORDER BY id DESC';
$result=Database::query($sql);
$row=Database::fetch_array($result);
- $lastversiondate=$row['dtime'];
+ $lastversiondate=api_get_local_time($row['dtime'], null, null, date_default_timezone_get());
$lastuserinfo=Database::get_user_info_from_id($row['user_id']);
//select page to discuss
@@ -2408,7 +2385,7 @@ if ($_GET['action']=='discuss')
echo '';
echo '';
echo ''.$author_photo.' | ';
- echo ''.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).' ('.$author_status.') '.$row['dtime'].' - '.get_lang('Rating').': '.$row['p_score'].' '.$imagerating.' | ';
+ echo ''.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).' ('.$author_status.') '.api_get_local_time($row['dtime'], null, null, date_default_timezone_get()).' - '.get_lang('Rating').': '.$row['p_score'].' '.$imagerating.' | ';
echo ' ';
echo '';
echo ''.$row['comment'].' | ';
@@ -2452,4 +2429,4 @@ FOOTER
*/
//$_SESSION['_gid'];
Display::display_footer();
-?>
\ No newline at end of file
+?>
diff --git a/main/work/work.lib.php b/main/work/work.lib.php
index 440e893e4c..f3b7067928 100755
--- a/main/work/work.lib.php
+++ b/main/work/work.lib.php
@@ -718,6 +718,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
}
if ($direc_date!='' && $direc_date!='0000-00-00 00:00:00') {
+ $direc_date = api_get_local_time($direc_date, null, null, date_default_timezone_get());
$my_direc_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($direc_date))).' ';
$my_direc_date .= ucfirst(strftime($timeNoSecFormat,strtotime($direc_date)));
$row[]= date_to_str_ago($direc_date).' '.$my_direc_date.''.'';
@@ -779,8 +780,9 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$row[]= build_document_icon_tag('file',$work->url);
$row[]= ''.$work->title.' '.$work->description;
$row[]= display_user_link_work($row2['insert_user_id'],$work->author).$qualification_string;// $work->author;
- $sent_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($work->sent_date))).' ';
- $sent_date .= ucfirst(strftime($timeNoSecFormat,strtotime($work->sent_date)));
+ $work_sent_date = api_get_local_time($work->sent_date, null, null, date_default_timezone_get());
+ $sent_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($work_sent_date))).' ';
+ $sent_date .= ucfirst(strftime($timeNoSecFormat,strtotime($work_sent_date)));
$row[]= date_to_str_ago($work->sent_date).$add_string.' '.$sent_date.''.'';
if( $is_allowed_to_edit) {
diff --git a/tests/main/newscorm/scorm.class.test.php b/tests/main/newscorm/scorm.class.test.php
new file mode 100644
index 0000000000..b0e02bba50
--- /dev/null
+++ b/tests/main/newscorm/scorm.class.test.php
@@ -0,0 +1,184 @@
+scorm($course_code=null,$resource_id=null,$user_id=null);
+ $this->assertTrue(is_null($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }*/
+
+ function testOpen() {
+ //ob_start();
+ $id = 1;
+ $res = scorm::open($id);
+ $this->assertTrue(is_null($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testParseManifest() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->parse_manifest($file='');
+ $this->assertTrue(is_null($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testImportManifest() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->import_manifest($course_code = 'COURSETEST');
+ $this->assertTrue(is_null($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+ /*
+ function testImportLocalPackage() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->import_local_package($file_path,$current_dir='');
+ $this->assertTrue(is_string($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testImportPackage() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->import_package($zip_file_info,$current_dir = '');
+ $this->assertTrue(is_string($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }*/
+
+ function testSetProximity() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->set_proximity($proxy='');
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testSetTheme() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->set_theme($theme='Chamilo');
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testSetPreviewImage() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->set_preview_image($preview_image='');
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testSetAuthor() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->set_author($author='');
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testSetMaker() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->set_maker($maker='');
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testExportZip() {
+ //ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->export_zip($lp_id=null);
+ $this->assertTrue(is_bool($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testGetResPath() {
+ //ob_start();
+ $res = scorm::get_res_path($id=1);
+ $this->assertTrue(is_string($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testGetResType() {
+ //ob_start();
+ $res = scorm::get_res_type($id = 1);
+ $this->assertTrue(is_string($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testGetTitle() {
+ //ob_start();
+ $res = scorm::get_title();
+ $this->assertTrue(is_string($res));
+ //ob_end_clean();
+ //var_dump($res);
+ }
+
+ function testReimportManifest() {
+ ob_start();
+ $course_code = 'COURSETEST';
+ $resource_id = 1;
+ $user_id = 1;
+ $obj = new scorm($course_code, $resource_id, $user_id);
+ $res = $obj->reimport_manifest($course = 'COURSETEST',$lp_id=null,$imsmanifest_path='');
+ $this->assertTrue(is_bool($res));
+ ob_end_clean();
+ //var_dump($res);
+ }
+}
+?>
\ No newline at end of file
diff --git a/tests/setup.inc.php b/tests/setup.inc.php
new file mode 100644
index 0000000000..9868961f59
--- /dev/null
+++ b/tests/setup.inc.php
@@ -0,0 +1,197 @@
+ $cidReq,
+ 'title'=>$cidReq,
+ 'tutor_name'=>'John Doe',
+ 'category_code'=>'LANG',
+ 'course_language'=>'spanish',
+ 'course_admin_id'=>'001',
+ 'db_prefix'=> $_configuration['db_prefix'],
+ 'firstExpirationDelay'=>'999'
+ );
+ $res = create_course($course_datos['wanted_code'], $course_datos['title'],
+ $course_datos['tutor_name'], $course_datos['category_code'],
+ $course_datos['course_language'],$course_datos['course_admin_id'],
+ $course_datos['db_prefix'], $course_datos['firstExpirationDelay']);
+}
+
+
+$sql = "SELECT course.*, course_category.code faCode, course_category.name faName
+ FROM $course_table
+ LEFT JOIN $course_cat_table
+ ON course.category_code = course_category.code
+ WHERE course.code = '$cidReq'";
+
+$result = Database::query($sql,__FILE__,__LINE__);
+
+/*
+-----------------------------------------------------------
+ Create the session
+-----------------------------------------------------------
+*/
+if (Database::num_rows($result)>0) {
+ $cData = Database::fetch_array($result);
+ $_cid = $cData['code' ];
+ $_course = array();
+ $_course['id' ] = $cData['code' ]; //auto-assigned integer
+ $_course['name' ] = $cData['title' ];
+ $_course['official_code'] = $cData['visual_code' ]; // use in echo
+ $_course['sysCode' ] = $cData['code' ]; // use as key in db
+ $_course['path' ] = $cData['directory' ]; // use as key in path
+ $_course['dbName' ] = $cData['db_name' ]; // use as key in db list
+ $_course['dbNameGlu' ] = $_configuration['table_prefix'] . $cData['db_name'] . $_configuration['db_glue']; // use in all queries
+ $_course['titular' ] = $cData['tutor_name' ];
+ $_course['language' ] = $cData['course_language' ];
+ $_course['extLink' ]['url' ] = $cData['department_url' ];
+ $_course['extLink' ]['name'] = $cData['department_name' ];
+ $_course['categoryCode'] = $cData['faCode' ];
+ $_course['categoryName'] = $cData['faName' ];
+ $_course['visibility' ] = $cData['visibility' ];
+ $_course['subscribe_allowed'] = $cData['subscribe' ];
+ $_course['unubscribe_allowed'] = $cData['unsubscribe' ];
+
+ api_session_register('_cid');
+ api_session_register('_course');
+}
+
+/*
+-----------------------------------------------------------
+ Load the session
+-----------------------------------------------------------
+*/
+$_SESSION['_user']['user_id'] = 1;
+$_SESSION['is_courseAdmin'] = 1;
+$_SESSION['show'] = showall;
+
+/*
+-----------------------------------------------------------
+ Load the user
+-----------------------------------------------------------
+*/
+$_user['user_id'] = $_SESSION['_user']['user_id'];
+
+
diff --git a/tests/teardown.inc.php b/tests/teardown.inc.php
new file mode 100644
index 0000000000..91e9f42ab3
--- /dev/null
+++ b/tests/teardown.inc.php
@@ -0,0 +1,165 @@
+assertTrue(is_string($msg));
+ } else {
+ $path = $dirname.'upload';
+ $filemode = '0777';
+ $res = api_chmod_R($path, $filemode);
+ unlink($path);
+ $this->assertTrue($res || IS_WINDOWS_OS); // We know, it does not work for Windows.
+ }
+ /*
+ function testApiIsAllowed(){
+ global $_course, $_user;
+ $tool= 'full';
+ $action = 'delete';
+ $res=api_is_allowed($tool, $action, $task_id=0);
+ if(!is_bool($res)){
+ $this->assertTrue(is_null($res));
+ }
+ $this->assertTrue($action);
+ $this->assertTrue($_user['user_id']);
+ }
+
+
+ function testApiNotAllowed(){
+ ob_start();
+ //api_not_allowed($print_headers = false);
+ $res = ob_get_contents();
+ $this->assertEqual($res,'');
+ ob_end_clean();
+ }
+
+ function testApiIsAllowedToCreateCourse() {
+ $res=api_is_allowed_to_create_course();
+ if(!is_bool($res)){
+ $this->assertTrue(is_null($res));
+ }
+ }
+
+ function testApiIsCoach(){
+ global $_user;
+ global $sessionIsCoach;
+ $_user['user_id']=2;
+ $sessionIsCoach=Database::store_result($result=false);
+ $res=api_is_coach();
+ $this->assertTrue(is_bool($res));
+ //var_dump($res);
+ $this->assertTrue($_user['user_id']);
+ $this->assertTrue(is_array($sessionIsCoach));
+ //var_dump($sessionIsCoach);
+ }
+
+ function testApiIsSessionAdmin(){
+ global $_user;
+ $_user['status']=true;
+ $res=api_is_session_admin();
+ $this->assertTrue(is_bool($res));
+ $this->assertTrue(is_array($_user));
+ //var_dump($_user);
+
+ }
+
+
+ function testApiIsCourseCoach() {
+ $res=api_is_course_coach();
+ if(!is_bool($res)){
+ $this->assertTrue(is_null($res));
+ }
+ }
+
+ function testApiIsSessionAdmin(){
+ global $_user;
+ $_user['status']=true;
+ $res=api_is_session_admin();
+ $this->assertTrue(is_bool($res));
+ $this->assertTrue(is_array($_user));
+ //var_dump($_user);
+
+ }
+
+ function testApiNotAllowed(){
+ ob_start();
+ //api_not_allowed($print_headers = false);
+ $res = ob_get_contents();
+ $this->assertEqual($res,'');
+ ob_end_clean();
+ }
+
+ function testApiSessionDestroy(){
+ if (!headers_sent()) {
+ $res=api_session_destroy();
+ }
+ $this->assertTrue(is_null($res));
+ //var_dump($res);
+ }
+
+ function testApiSessionStart(){
+ if (!headers_sent()) {
+ $res = api_session_start($already_sintalled=true);
+ }
+ $this->assertTrue(is_null($res));
+ //var_dump($res);
+ }
+ */
\ No newline at end of file
diff --git a/tests/test_suite.php b/tests/test_suite.php
index ce72a52850..02e26c4d8e 100755
--- a/tests/test_suite.php
+++ b/tests/test_suite.php
@@ -1,142 +1,52 @@
$cidReq,
- 'title'=>$cidReq,
- 'tutor_name'=>'John Doe',
- 'category_code'=>'LANG',
- 'course_language'=>'spanish',
- 'course_admin_id'=>'001',
- 'db_prefix'=> $_configuration['db_prefix'],
- 'firstExpirationDelay'=>'999'
- );
- $res = create_course($course_datos['wanted_code'], $course_datos['title'],
- $course_datos['tutor_name'], $course_datos['category_code'],
- $course_datos['course_language'],$course_datos['course_admin_id'],
- $course_datos['db_prefix'], $course_datos['firstExpirationDelay']);
- }
-
- $course_table = Database::get_main_table(TABLE_MAIN_COURSE);
- $course_cat_table = Database::get_main_table(TABLE_MAIN_CATEGORY);
- $sql = "SELECT course.*, course_category.code faCode, course_category.name faName
- FROM $course_table
- LEFT JOIN $course_cat_table
- ON course.category_code = course_category.code
- WHERE course.code = '$cidReq'";
- $result = Database::query($sql,__FILE__,__LINE__);
-
- //create the session
-
- if (Database::num_rows($result)>0) {
- $cData = Database::fetch_array($result);
- $_cid = $cData['code' ];
- $_course = array();
- $_course['id' ] = $cData['code' ]; //auto-assigned integer
- $_course['name' ] = $cData['title' ];
- $_course['official_code'] = $cData['visual_code' ]; // use in echo
- $_course['sysCode' ] = $cData['code' ]; // use as key in db
- $_course['path' ] = $cData['directory']; // use as key in path
- $_course['dbName' ] = $cData['db_name' ]; // use as key in db list
- $_course['dbNameGlu' ] = $_configuration['table_prefix'] . $cData['db_name'] . $_configuration['db_glue']; // use in all queries
- $_course['titular' ] = $cData['tutor_name' ];
- $_course['language' ] = $cData['course_language' ];
- $_course['extLink' ]['url' ] = $cData['department_url' ];
- $_course['extLink' ]['name'] = $cData['department_name'];
- $_course['categoryCode'] = $cData['faCode' ];
- $_course['categoryName'] = $cData['faName' ];
- $_course['visibility' ] = $cData['visibility'];
- $_course['subscribe_allowed'] = $cData['subscribe'];
- $_course['unubscribe_allowed'] = $cData['unsubscribe'];
-
- api_session_register('_cid');
- api_session_register('_course');
- }
-
- $_SESSION['_user']['user_id'] = 1;
- $_user['user_id'] = $_SESSION['_user']['user_id'];
- $_SESSION['is_courseAdmin'] = 1;
- $_SESSION['show'] = showall;
-
- }
function TestsSuite() {
- $this->setUp();
$this->TestSuite('All tests suite');
/* $this->addTestFile(dirname(__FILE__).'/main/inc/lib/database.lib.test.php');
$this->addTestFile(dirname(__FILE__).'/main/inc/lib/add_course.lib.inc.test.php');
@@ -241,9 +151,8 @@ class TestsSuite extends TestSuite {
/**FORUM*/
$this->addTestFile(dirname(__FILE__).'/main/forum/forumfunction.inc.test.php');
-
- $this->addTestFile(dirname(__FILE__).'/main/inc/lib/main_api.lib.test.php');//this file delete the course,session and the use of api_allow
- $this->addTestFile(dirname(__FILE__).'/main/inc/lib/debug.lib.inc.test.php');//this file need be to the finish of the tests
+ //$this->addTestFile(dirname(__FILE__).'/main/inc/lib/main_api.lib.test.php');
+ //$this->addTestFile(dirname(__FILE__).'/main/inc/lib/debug.lib.inc.test.php');
|