$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'; } else { wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "manageAction : Problem to add the resource into the database"); redirection($redirectionUrl . '&error=problem_vt'); }