@@ 1835-1844 (lines=10) @@ | ||
1832 | * |
|
1833 | * @return boolean true if field updated, false otherwise |
|
1834 | */ |
|
1835 | public static function update_extra_field_value($userId, $variable, $value = '') |
|
1836 | { |
|
1837 | $extraFieldValue = new ExtraFieldValue('user'); |
|
1838 | $params = [ |
|
1839 | 'item_id' => $userId, |
|
1840 | 'variable' => $variable, |
|
1841 | 'value' => $value |
|
1842 | ]; |
|
1843 | return $extraFieldValue->save($params); |
|
1844 | } |
|
1845 | ||
1846 | /** |
|
1847 | * Get an array of extra fields with field details (type, default value and options) |
@@ 2359-2368 (lines=10) @@ | ||
2356 | * @param string Field value |
|
2357 | * @return boolean true if field updated, false otherwise |
|
2358 | */ |
|
2359 | public static function update_session_extra_field_value($sessionId, $variable, $value = '') |
|
2360 | { |
|
2361 | $extraFieldValue = new ExtraFieldValue('session'); |
|
2362 | $params = [ |
|
2363 | 'item_id' => $sessionId, |
|
2364 | 'variable' => $variable, |
|
2365 | 'value' => $value, |
|
2366 | ]; |
|
2367 | $extraFieldValue->save($params); |
|
2368 | } |
|
2369 | ||
2370 | /** |
|
2371 | * Checks the relationship between a session and a course. |