public function listofmodule($request, $response)
	{/*{{{*/
		$response->programList = DAL::get()->find_all('Program');
		$moduleId = $request->moduleid;
		$programId = $request->programid;
		
		$response->moduleId = $moduleId;
		
		$response->moduleid_seleted = $request->moduleid;
		$response->programid_seleted = $request->programid;
		
		$response->module = Module::getById($moduleId);
		
		$response->funpoints = array();
		if($response->module instanceof Module)
		{
			$response->funpoints = $response->module->getFunpoints();
			
			//fix programid_seleted
			$response->programid_seleted = $response->module->program->id;
			$response->program = $response->module->program;
		}elseif($request->programid > 0){
			$response->program = Program::getById($request->programid);
			$response->funpoints = $response->program->getFunpoints();
		}
	}/*}}}*/
Пример #2
0
	public function listofprogram($request, $response)
	{/*{{{*/
		$response->programList = DAL::get()->find_all('Program');
		$programId =  $request->programid;
		$response->programId = $programId;
		$response->program = $program = Program::getById($programId);
		
		$response->modules = array();
		
		if($program instanceof Program)
		{
			$response->modules = $program->getModules();
		}elseif($request->programid === '0') {
			$response->modules = DAL::get()->find_all('Module');
		}
		
	}/*}}}*/
<?php
$programId_i = 0;
foreach($testTask->getTaskItems4Process() as $programId => $arr1)
{
	$aProgram = Program::getById($programId);
	$programId_i ++;
?>

<div class='greenBorderDiv'>
	<span style='font-weight:bold;'>
		<?php if($aProgram->id != $taskItem->usecase->funpoint->module->program->id){ ?>
			<a href='/taskitem/next?testTaskId=<?=$testTask->id ?>&programId=<?=$programId ?>'>项目<?=$programId_i?>:<?=$aProgram->name?></a> 
		<?php }else{ ?>项目<?=$programId_i?>:<?=$aProgram->name?>
		<?php }?>
	</span>
	 <?php ?>
	
	<?php if( $aProgram->id != $taskItem->usecase->funpoint->module->program->id){
				echo $testTask->getSumInfoStr4Program($arr1);
				echo '</div>';
				continue;
			}else{
				echo $testTask->getSimpleSumInfoStr4Program($arr1);
			} ?>
	
	<?php 
		$moduleId_i = 0;
		foreach($arr1 as $moduleId => $arr2){
			$aModule = Module::getById($moduleId);
			$moduleId_i ++;
	?>