Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 2465-2474 (lines=10) @@
2462
     * @param	string	Field value
2463
     * @return	boolean	true if field updated, false otherwise
2464
     */
2465
    public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2466
    {
2467
        $extraFieldValue = new ExtraFieldValue('session');
2468
        $params = [
2469
            'item_id' => $sessionId,
2470
            'variable' => $variable,
2471
            'value' => $value,
2472
        ];
2473
        return $extraFieldValue->save($params);
2474
    }
2475
2476
    /**
2477
     * Checks the relationship between a session and a course.

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

@@ 2052-2061 (lines=10) @@
2049
     *
2050
     * @return    boolean    true if field updated, false otherwise
2051
     */
2052
    public static function update_extra_field_value($userId, $variable, $value = '')
2053
    {
2054
        $extraFieldValue = new ExtraFieldValue('user');
2055
        $params = [
2056
            'item_id' => $userId,
2057
            'variable' => $variable,
2058
            'value' => $value
2059
        ];
2060
2061
        return $extraFieldValue->save($params);
2062
    }
2063
2064
    /**