Ejemplo n.º 1
0
$tproject_mgr = new testproject($db);
$req_spec_mgr = new requirement_spec_mgr($db);
$tcasecfg = config_get('testcase_cfg');
$tcprefix = $tproject_mgr->getTestCasePrefix($args->tprojectID) . $tcasecfg->glue_character;
// get list of ReqSpec
$ns = new stdClass();
// $ns->reqSpec = $tproject_mgr->getOptionReqSpec($args->tprojectID);
$ns->reqSpec = $tproject_mgr->genComboReqSpec($args->tprojectID);
//get first ReqSpec if not defined
if ($args->reqSpecID == 0 && count($ns->reqSpec)) {
    reset($ns->reqSpec);
    $args->reqSpecID = key($ns->reqSpec);
}
// collect REQ data
$ns->coverage = $req_spec_mgr->get_coverage($args->reqSpecID);
$ns->metrics = $req_spec_mgr->get_metrics($args->reqSpecID);
$smarty = new TLSmarty();
foreach ($ns as $key => $value) {
    $smarty->assign($key, $value);
}
$smarty->assign('tcprefix', $tcprefix);
$smarty->assign('selectedReqSpec', $args->reqSpecID);
$smarty->assign('modify_req_rights', has_rights($db, "mgt_modify_req"));
$smarty->display($template_dir . $default_template);
/*
  function: init_args
  args:
  
  returns: 
*/
function init_args()