* testcase: refactor the ajaxGetModuleScenes method.

This commit is contained in:
liugang
2023-08-09 10:30:25 +08:00
parent a050ec31c3
commit ce19ef457c
+5 -13
View File
@@ -2630,24 +2630,16 @@ class testcase extends control
* @param int $productID
* @param int $branch
* @param int $moduleID
* @param int $stype
* @param int $storyID
* @param bool $onlyOption
* @param string $status
* @param string $limit
* @param string $type
* @param int $hasParent
* @param string $number
* @param int $currentScene
* @param string $element
* @param int $sceneID
* @access public
* @return void
*/
public function ajaxGetModuleScenes($productID, $branch = 0, $moduleID = 0, $stype = 1, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1, $number = '', $currentScene = 0)
public function ajaxGetScenes($productID, $branch = 0, $moduleID = 0, $element = 'scene', $sceneID = 0)
{
$optionMenu = $this->testcase->getSceneMenu($productID, $moduleID, 'case', 0, $branch, $currentScene);
$output = ($stype == 1) ? html::select("parent", $optionMenu, "", "class='form-control'") : $output = html::select("scene".$number, $optionMenu, array('' => ''), "class='form-control'");
$scenes = $this->testcase->getSceneMenu($productID, $moduleID, 'case', 0, $branch, $sceneID);
die($output);
die(html::select($element, $scenes, '', "class='form-control'"));
}
/**