Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 2117-2126 (lines=10) @@
2114
     *
2115
     * @return    boolean    true if field updated, false otherwise
2116
     */
2117
    public static function update_extra_field_value($userId, $variable, $value = '')
2118
    {
2119
        $extraFieldValue = new ExtraFieldValue('user');
2120
        $params = [
2121
            'item_id' => $userId,
2122
            'variable' => $variable,
2123
            'value' => $value
2124
        ];
2125
2126
        return $extraFieldValue->save($params);
2127
    }
2128
2129
    /**

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

@@ 2661-2670 (lines=10) @@
2658
     * @param	string	Field value
2659
     * @return	boolean	true if field updated, false otherwise
2660
     */
2661
    public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2662
    {
2663
        $extraFieldValue = new ExtraFieldValue('session');
2664
        $params = [
2665
            'item_id' => $sessionId,
2666
            'variable' => $variable,
2667
            'value' => $value,
2668
        ];
2669
        return $extraFieldValue->save($params);
2670
    }
2671
2672
    /**
2673
     * Checks the relationship between a session and a course.