Skip to content

Commit 6954628

Browse files
committed
Adding static declarations
1 parent 2074a68 commit 6954628

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main/newscorm/learnpath.class.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ public function get_items_status_list() {
24452445
* @param integer course id
24462446
* @return integer Number of interactions
24472447
*/
2448-
public function get_interactions_count_from_db($lp_iv_id, $course_id) {
2448+
public static function get_interactions_count_from_db($lp_iv_id, $course_id) {
24492449
$table = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
24502450
$lp_iv_id = intval($lp_iv_id);
24512451
$course_id = intval($course_id);
@@ -2467,7 +2467,7 @@ public function get_interactions_count_from_db($lp_iv_id, $course_id) {
24672467
* @return array
24682468
* @todo Transcode labels instead of switching to HTML (which requires to know the encoding of the LP)
24692469
*/
2470-
public function get_iv_interactions_array($lp_iv_id = 0) {
2470+
public static function get_iv_interactions_array($lp_iv_id = 0) {
24712471
$course_id = api_get_course_int_id();
24722472
$list = array ();
24732473
$table = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
@@ -2508,11 +2508,12 @@ public function get_iv_interactions_array($lp_iv_id = 0) {
25082508
* @param integer Item View ID
25092509
* @return integer Number of objectives
25102510
*/
2511-
public function get_objectives_count_from_db($lp_iv_id, $course_id) {
2511+
public static function get_objectives_count_from_db($lp_iv_id, $course_id) {
25122512
$table = Database :: get_course_table(TABLE_LP_IV_OBJECTIVE);
25132513
$course_id = intval($course_id);
25142514
$lp_iv_id = intval($lp_iv_id);
25152515
$sql = "SELECT count(*) FROM $table WHERE c_id = $course_id AND lp_iv_id = $lp_iv_id";
2516+
//@todo seems that this always returns 0
25162517
$res = Database::query($sql);
25172518
$res = 0;
25182519
if (Database::num_rows($res)) {

0 commit comments

Comments
 (0)