';
$waitingInvitation .= '
'.$invitation['picture_uri'].'
';
@@ -235,7 +235,7 @@ if (count($pending_invitations) > 0) {
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'invitations');
$tpl->assign('social_menu_block', $social_menu_block);
-$tpl->assign('social_invitations_block',$socialInvitationsBlock);
+$tpl->assign('social_invitations_block', $socialInvitationsBlock);
$tpl->assign('content', $content);
$social_layout = $tpl->get_template('social/invitations.tpl');
$tpl->display($social_layout);
diff --git a/main/work/work.lib.php b/main/work/work.lib.php
index 1b5d8d4097..c40e4c7b33 100755
--- a/main/work/work.lib.php
+++ b/main/work/work.lib.php
@@ -5290,24 +5290,25 @@ function getWorkCreatedByUser($user_id, $courseId, $sessionId)
$sessionId
);
- $forumList = array();
+ $list = array();
if (!empty($items)) {
- foreach ($items as $forum) {
+ foreach ($items as $work) {
$item = get_work_data_by_id(
- $forum['ref'],
+ $work['ref'],
$courseId,
$sessionId
);
-
- $forumList[] = array(
- $item['title'],
- api_get_local_time($forum['insert_date']),
- api_get_local_time($forum['lastedit_date'])
- );
+ if (!empty($item)) {
+ $list[] = array(
+ $item['title'],
+ api_get_local_time($work['insert_date']),
+ api_get_local_time($work['lastedit_date'])
+ );
+ }
}
}
- return $forumList;
+ return $list;
}
/**