From 67bfaa825f71907dbdbb65f27c0c674e321f5303 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 23 Jul 2012 18:12:59 +0200 Subject: [PATCH] Removing unused function checkArchive() --- main/inc/lib/add_course.lib.inc.php | 9 +-------- tests/main/inc/lib/add_course.lib.inc.test.php | 10 +--------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index 4ae089e5e8..2f0027f37c 100644 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -2749,7 +2749,7 @@ function register_course($params) { $subject = get_lang('NewCourseCreatedIn').' '.$siteName.' - '.$iname; $message = get_lang('Dear').' '.$recipient_name.",\n\n".get_lang('MessageOfNewCourseToAdmin').' '.$siteName.' - '.$iname."\n"; $message .= get_lang('CourseName').' '.$title."\n"; - $message .= get_lang('Category').' '.$category."\n"; + $message .= get_lang('Category').' '.$category_code."\n"; $message .= get_lang('Tutor').' '.$tutor_name."\n"; $message .= get_lang('Language').' '.$course_language; @@ -2761,13 +2761,6 @@ function register_course($params) { return $course_id; } -/** - * WARNING: This function always returns true. - */ -function checkArchive($path_to_archive) { - return true; -} - /** * Extract properties of the files from a ZIP package, write them to disk and * return them as an array. diff --git a/tests/main/inc/lib/add_course.lib.inc.test.php b/tests/main/inc/lib/add_course.lib.inc.test.php index d5192b857b..667a0deb1d 100755 --- a/tests/main/inc/lib/add_course.lib.inc.test.php +++ b/tests/main/inc/lib/add_course.lib.inc.test.php @@ -119,13 +119,6 @@ class TestAddCourse extends UnitTestCase { $this->assertTrue($res); } - function TestCheckArchive(){ - $dirarchive = api_get_path(SYS_PATH); - $pathToArchive = $dirarchive.'archive'; - $res = checkArchive($pathToArchive); - $this->assertTrue($res === TRUE); - } - public function TestDeleteCourse(){ $code = 'testcourse'; $res = CourseManager::delete_course($code); @@ -141,5 +134,4 @@ class TestAddCourse extends UnitTestCase { closedir($handle); } } - -} +} \ No newline at end of file