Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 2448-2457 (lines=10) @@
2445
     * @param	string	Field value
2446
     * @return	boolean	true if field updated, false otherwise
2447
     */
2448
    public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2449
    {
2450
        $extraFieldValue = new ExtraFieldValue('session');
2451
        $params = [
2452
            'item_id' => $sessionId,
2453
            'variable' => $variable,
2454
            'value' => $value,
2455
        ];
2456
        return $extraFieldValue->save($params);
2457
    }
2458
2459
    /**
2460
     * Checks the relationship between a session and a course.

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

@@ 2041-2050 (lines=10) @@
2038
     *
2039
     * @return    boolean    true if field updated, false otherwise
2040
     */
2041
    public static function update_extra_field_value($userId, $variable, $value = '')
2042
    {
2043
        $extraFieldValue = new ExtraFieldValue('user');
2044
        $params = [
2045
            'item_id' => $userId,
2046
            'variable' => $variable,
2047
            'value' => $value
2048
        ];
2049
2050
        return $extraFieldValue->save($params);
2051
    }
2052
2053
    /**