Code Duplication    Length = 10-10 lines in 2 locations

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

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

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

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