Code Duplication    Length = 11-11 lines in 3 locations

main/lp/learnpath.class.php 3 locations

@@ 3684-3694 (lines=11) @@
3681
     * Gets the user ID
3682
     * @return	integer	User ID
3683
     */
3684
    public function get_user_id()
3685
    {
3686
        if ($this->debug > 0) {
3687
            error_log('New LP - In learnpath::get_user_id()', 0);
3688
        }
3689
        if (!empty ($this->user_id)) {
3690
            return $this->user_id;
3691
        } else {
3692
            return false;
3693
        }
3694
    }
3695
3696
    /**
3697
     * Checks if any of the items has an audio element attached
@@ 2633-2643 (lines=11) @@
2630
     * Gets the learnpath session id
2631
     * @return int
2632
     */
2633
    public function get_lp_session_id()
2634
    {
2635
        if ($this->debug > 0) {
2636
            error_log('New LP - In learnpath::get_lp_session_id()', 0);
2637
        }
2638
        if (!empty ($this->lp_session_id)) {
2639
            return (int) $this->lp_session_id;
2640
        } else {
2641
            return 0;
2642
        }
2643
    }
2644
2645
    /**
2646
     * Gets the learnpath image
@@ 3275-3285 (lines=11) @@
3272
     * Gets the learnpath name/title
3273
     * @return	string	Learnpath name/title
3274
     */
3275
    public function get_name()
3276
    {
3277
        if ($this->debug > 0) {
3278
            error_log('New LP - In learnpath::get_name()', 0);
3279
        }
3280
        if (!empty ($this->name)) {
3281
            return $this->name;
3282
        } else {
3283
            return 'N/A';
3284
        }
3285
    }
3286
3287
    /**
3288
     * Gets a link to the resource from the present location, depending on item ID.