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

@@ 2068-2077 (lines=10) @@
2065
     *
2066
     * @return    boolean    true if field updated, false otherwise
2067
     */
2068
    public static function update_extra_field_value($userId, $variable, $value = '')
2069
    {
2070
        $extraFieldValue = new ExtraFieldValue('user');
2071
        $params = [
2072
            'item_id' => $userId,
2073
            'variable' => $variable,
2074
            'value' => $value
2075
        ];
2076
2077
        return $extraFieldValue->save($params);
2078
    }
2079
2080
    /**