Code Duplication    Length = 10-10 lines in 2 locations

main/inc/lib/sessionmanager.lib.php 1 location

@@ 2647-2656 (lines=10) @@
2644
     * @param	string	Field value
2645
     * @return	boolean	true if field updated, false otherwise
2646
     */
2647
    public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2648
    {
2649
        $extraFieldValue = new ExtraFieldValue('session');
2650
        $params = [
2651
            'item_id' => $sessionId,
2652
            'variable' => $variable,
2653
            'value' => $value,
2654
        ];
2655
        return $extraFieldValue->save($params);
2656
    }
2657
2658
    /**
2659
     * Checks the relationship between a session and a course.

main/inc/lib/usermanager.lib.php 1 location

@@ 2118-2127 (lines=10) @@
2115
     *
2116
     * @return    boolean    true if field updated, false otherwise
2117
     */
2118
    public static function update_extra_field_value($userId, $variable, $value = '')
2119
    {
2120
        $extraFieldValue = new ExtraFieldValue('user');
2121
        $params = [
2122
            'item_id' => $userId,
2123
            'variable' => $variable,
2124
            'value' => $value
2125
        ];
2126
2127
        return $extraFieldValue->save($params);
2128
    }
2129
2130
    /**