Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 2415-2424 (lines=10) @@
2412
     * @param	string	Field value
2413
     * @return	boolean	true if field updated, false otherwise
2414
     */
2415
    public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2416
    {
2417
        $extraFieldValue = new ExtraFieldValue('session');
2418
        $params = [
2419
            'item_id' => $sessionId,
2420
            'variable' => $variable,
2421
            'value' => $value,
2422
        ];
2423
        return $extraFieldValue->save($params);
2424
    }
2425
2426
    /**
2427
     * Checks the relationship between a session and a course.

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

@@ 2025-2034 (lines=10) @@
2022
     *
2023
     * @return    boolean    true if field updated, false otherwise
2024
     */
2025
    public static function update_extra_field_value($userId, $variable, $value = '')
2026
    {
2027
        $extraFieldValue = new ExtraFieldValue('user');
2028
        $params = [
2029
            'item_id' => $userId,
2030
            'variable' => $variable,
2031
            'value' => $value
2032
        ];
2033
2034
        return $extraFieldValue->save($params);
2035
    }
2036
2037
    /**