private function saveContentDetails($courseId, $moduleId, $itemId, $contentId, $type, $contentDetails) { $content = Content::firstOrNew(array('content_id' => $contentId)); $content->content_id = $contentId; $content->content_type = $type; $content->module_item_id = $itemId; //$content->tags=$contentDetails->content_id; if (isset($contentDetails->points_possible)) { $content->points_possible = $contentDetails->points_possible; } if (isset($contentDetails->due_at)) { $content->due_at = $contentDetails->due_at; } if (isset($contentDetails->unlock_at)) { $content->unlock_at = $contentDetails->unlock_at; } if (isset($contentDetails->lock_at)) { $content->lock_at = $contentDetails->lock_at; } if (isset($contentDetails->lock_explanation)) { $content->lock_explanation = $contentDetails->lock_explanation; } $content->save(); return $content; }
public function getAssignmentTags($assignment_id) { $content = Content::where(array('content_id' => $assignment_id))->first(); if (!is_null($content)) { return $content->tags; } else { return ""; } }