} if ($params['action'] == "createDefault") { echo $result->getRid(); exit; } } else { if ($params['action'] == "createDefault") { echo "error"; exit; } wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "manageAction :Problem to add the new resource on the vt server"); redirection($redirectionUrl . '&error=problem_vt'); } } elseif ($params['action'] == 'update') { if ($params['type'] == "board") { $result = $vtAction->modifyBoard($params["resource_id"]); //create the resource on the vt 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";