From f088d75e214c1ca5ca9a2b38069297e031ec2a23 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Sat, 19 May 2012 19:07:16 +0200 Subject: [PATCH] Commenting adding @deprecated in some scorm unused functions see #4716 --- .../gradebook/lib/gradebook_functions.inc.php | 3 - main/newscorm/scorm.lib.php | 1 + tests/main/newscorm/scorm.lib.test.php | 56 +++---------------- 3 files changed, 10 insertions(+), 50 deletions(-) diff --git a/main/gradebook/lib/gradebook_functions.inc.php b/main/gradebook/lib/gradebook_functions.inc.php index 2e865823ae..1e60f134a7 100644 --- a/main/gradebook/lib/gradebook_functions.inc.php +++ b/main/gradebook/lib/gradebook_functions.inc.php @@ -854,7 +854,4 @@ function score_badges($list_values) { } return Display::badge_group($badges); - - - } \ No newline at end of file diff --git a/main/newscorm/scorm.lib.php b/main/newscorm/scorm.lib.php index 54c117eedf..d7e2d3f515 100644 --- a/main/newscorm/scorm.lib.php +++ b/main/newscorm/scorm.lib.php @@ -68,6 +68,7 @@ function removescormDir($dir) { * This function removes a directory if it exists * @param string Dir path * @return boolean True on success, false otherwise + * @deprecated * @uses removescormDir() to actually remove the directory */ function scorm_delete($file) { diff --git a/tests/main/newscorm/scorm.lib.test.php b/tests/main/newscorm/scorm.lib.test.php index 9b61545fde..28b96fe464 100755 --- a/tests/main/newscorm/scorm.lib.test.php +++ b/tests/main/newscorm/scorm.lib.test.php @@ -1,5 +1,5 @@ assertTrue(is_array($res)); - //var_dump($res); + $this->assertTrue(is_array($res)); } -/** - * Detects the SCORM version from an imsmanifest.xml file - * @param string Path to imsmanifest.xml - * @return string SCORM version (1.0,1.1,1.2,1.3) - * @todo Implement this public function - */ + /** + * Detects the SCORM version from an imsmanifest.xml file + * @param string Path to imsmanifest.xml + * @return string SCORM version (1.0,1.1,1.2,1.3) + * @todo Implement this public function + */ public function testget_scorm_version() { $path_name = api_get_path(SYS_COURSE_PATH); $path=$path_name.'scorm/'; @@ -36,41 +35,4 @@ class TestScormLib extends UnitTestCase { $this->assertTrue(is_string($res)); //var_dump($res); } - -/** - * Delete a scorm directory (check for imsmanifest and if found, deletes the related rows in scorm tables also) - * @param string Dir path - * @return boolean True on success, false otherwise - */ - public function testremovescormDirFalse() { - $path_name = api_get_path(SYS_COURSE_PATH); - $dir=$path_name.'scorm/'; - $res=removescormDir($dir); - $this->assertFalse($res); - //var_dump($res); - } - - public function testremovescormDirTrue() { - $path_name = api_get_path(SYS_COURSE_PATH); - $dir=$path_name.'scorm/'; - $res=removescormDir($dir); - $this->assertTrue(is_bool($res)); - //var_dump($res); - } - -/** - * This public function removes a directory if it exists - * @param string Dir path - * @return boolean True on success, false otherwise - * @uses removescormDir() to actually remove the directory - */ - public function testscorm_delete() { - require_once(api_get_path(LIBRARY_PATH).'fileManage.lib.php'); - $path_name = api_get_path(SYS_COURSE_PATH); - $file=$path_name.'scorm/'; - $res=scorm_delete($file); - $this->assertTrue(is_bool($res)); - //var_dump($res); - } -} -?> \ No newline at end of file +} \ No newline at end of file