function opigno_video_app_set_course_video_weight in Opigno Video App 7
Helper function to insert the weight of a video inside a course.
Parameters
int $gid:
int $nid:
int $weight:
2 calls to opigno_video_app_set_course_video_weight()
- opigno_video_app_node_insert in ./
opigno_video_app.module - Implements hook_node_insert().
- opigno_video_app_sort_course_videos_form_submit in includes/
opigno_video_app.pages.inc
File
- ./
opigno_video_app.module, line 287 - Module hooks.
Code
function opigno_video_app_set_course_video_weight($gid, $nid, $weight = 0) {
db_merge('opigno_video_app_video_sort')
->key(array(
'gid' => $gid,
'video_nid' => $nid,
))
->fields(array(
'gid' => $gid,
'video_nid' => $nid,
'weight' => $weight,
))
->execute();
}