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

@@ 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
    /**