Commit 022c81b8 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic
Browse files

Bug 1656078: Display description of introduction instead of title

In bug 1438894 the fields for the introduction
artefact were changed.
Now we need to use the description of the artefact
instead of the title to show the introduction text.


Change-Id: I00618b471bc3a1460824394c081773548e19f0b4
parent 00bce94f
......@@ -930,14 +930,14 @@ function get_group_user_search_results($group, $query, $offset, $limit, $members
if ($results['count']) {
$userids = array_map(create_function('$a', 'return $a["id"];'), $results['data']);
$introductions = get_records_sql_assoc("SELECT \"owner\", title
$introductions = get_records_sql_assoc("SELECT \"owner\", description
FROM {artefact}
WHERE artefacttype = 'introduction'
AND \"owner\" IN (" . implode(',', db_array_to_ph($userids)) . ')',
foreach ($results['data'] as &$result) {
$result['name'] = display_name($result);
$result['introduction'] = isset($introductions[$result['id']]) ? $introductions[$result['id']]->title : '';
$result['introduction'] = isset($introductions[$result['id']]) ? $introductions[$result['id']]->description : '';
if (isset($result['jointime'])) {
$result['jointime'] = format_date($result['jointime'], 'strftimedate');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment