if (!empty($params["filter_screen_name"])) { redirection($CFG->voicetools_servername . '/' . $params["type"] . '?action=display_popup&nid=' . $result->getNid() . "&filter_screen_name=" . $params["filter_screen_name"]); } else { redirection($CFG->voicetools_servername . '/' . $params["type"] . '?action=display_popup&nid=' . $result->getNid()); } } else { redirection($redirectionUrl . '&error=problem_vt'); } } elseif ($params['action'] == 'create' || $params['action'] == "createDefault") { if ($params['type'] == "board") { $result = $vtAction->createBoard(); //create the resource on the vt $messageAction = "created"; $messageProduct = "board"; } elseif ($params['type'] == "presentation") { $result = $vtAction->createPresentation(); $messageAction = "created"; $messageProduct = "presentation"; } elseif ($params['type'] == "pc") { $result = $vtAction->createPodcaster(); $messageAction = "created"; $messageProduct = "pc"; } if ($result != NULL && $result->error != "error") { $resource_id = storeResource($result->getRid(), $session->getCourseId(), $params); if (empty($resource_id)) { wimba_add_log(WIMBA_ERROR, voicepresentation_LOGS, "manageAction : Problem to add the resource into the database"); redirection($redirectionUrl . '&error=problem_bd'); } if ($params['action'] == "createDefault") { echo $result->getRid();