How to get course id which contain quiz belongs in quiz node? $quiz->og_group_ref['und'][0]['target_id']
Is this correct way to get course id in this style?
marcis26
Thu, 12/15/2016 - 09:37
For example how to get course
For example how to get course id from quiz which finished. For example get course id in which user is in.
James Aparicio
Thu, 12/15/2016 - 13:40
Hi marcis26,
Hi marcis26,
Yes, you should use the constant LANGUAGE_NONE instead of 'und'. That should give you one of the courses the lesson is associated to. If you have the lessons associated with several you will find them the same way with an index diferent than 0.
For example how to get course
Hi marcis26,
Hi marcis26,
Yes, you should use the constant LANGUAGE_NONE instead of 'und'. That should give you one of the courses the lesson is associated to. If you have the lessons associated with several you will find them the same way with an index diferent than 0.
You can always use field_get_items if you want.
https://api.drupal.org/api/drupal/modules%21field%21field.module/function/field_get_items/7.x
Best regards
In reply to Hi marcis26, by James Aparicio
LANGUAGE_NONE how to use it
Instead of
Instead of
$quiz->og_group_ref['und'][0]['target_id']
$quiz->og_group_ref[LANGUAGE_NONE][0]['target_id']
Best regards