if ($result != NULL && $result->error != "error") { if ($params['grade'] == 'true') { $params['gradeid'] = voicepresentation_add_grade_column($result->getRid(), $params["enc_course_id"], $result->getTitle(), $params["points_possible"]); } else { $resourceDb = get_record("voicepresentation_resources", "rid", $result->getRid()); if ($resourceDb->gradeid != -1) { voicepresentation_delete_grade_column($result->getRid(), $params["enc_course_id"]); $params['gradeid'] = -1; //the resource will also be updated } } } $messageAction = "updated"; $messageProduct = "board"; } elseif ($params['type'] == "presentation") { $result = $vtAction->modifyPresentation($params["resource_id"]); $messageAction = "updated"; $messageProduct = "presentation"; } elseif ($params['type'] == "pc") { $result = $vtAction->modifyPodcaster($params["resource_id"]); $messageAction = "updated"; $messageProduct = "pc"; } if ($result != NULL) { //create the object to store in the db $resource_id = updateResource($result->getRid(), $session->getCourseId(), $params); if (empty($resource_id)) { error_log(__FUNCTION__ . " : Problem to update the resource on the database", TRUE); redirection($redirectionUrl . '&error=problem_bd'); } $messageType = $params['type'] . 'Updated';