diff --git a/main/social/invitations.php b/main/social/invitations.php index f503f018f2..12c26e04fa 100755 --- a/main/social/invitations.php +++ b/main/social/invitations.php @@ -204,7 +204,7 @@ if (count($pending_invitations) > 0) { $img = ''; $invitation['picture_uri'] = ''.$img.''; $invitation['name'] = ''.cut($invitation['name'],120,true).''; - $invitation['description'] = cut($invitation['description'],220,true); + $invitation['description'] = cut($invitation['description'], 220, true); $new_invitation[]=$invitation; $waitingInvitation .= '
'; $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; } /**