Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lbplanner/classes/model/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Model for a course
* Model for a user
*
* @package local_lbplanner
* @subpackage helpers
Expand All @@ -36,7 +36,7 @@
use local_lbplanner\helpers\user_helper;

/**
* Model class for course
* Model class for model
*/
class user {
/**
Expand Down Expand Up @@ -337,6 +337,7 @@ public static function api_structure_short(): external_single_structure {
* @return array a full representation of this user and its data
*/
public function prepare_for_api(): array {
$mdluser = $this->get_mdluser();
return array_merge(
$this->prepare_for_api_short(),
[
Expand All @@ -346,6 +347,7 @@ public function prepare_for_api(): array {
'colorblindness' => $this->colorblindness,
'displaytaskcount' => $this->displaytaskcount,
'capabilities' => $this->get_capabilitybitmask(),
'email' => $mdluser->email,
]
);
}
Expand All @@ -370,6 +372,7 @@ public static function api_structure(): external_single_structure {
'displaytaskcount' => new external_value(PARAM_INT, 'If the user has the taskcount-enabled 1-yes 0-no'),
'capabilities' => new external_value(PARAM_INT, 'The capabilities of the user represented as a bitmask value'),
'vintage' => new external_value(PARAM_TEXT, 'The vintage of the user', VALUE_DEFAULT),
'email' => new external_value(PARAM_TEXT, 'The email address of the user'),
]
);
}
Expand Down
Loading