This commit is contained in:
田淑杰
2023-01-04 15:20:35 +08:00
parent 289005c41a
commit 624ac45620
2 changed files with 29 additions and 1 deletions
+28
View File
@@ -166,6 +166,7 @@ class tutorialModel extends model
$project->displayCards = 0;
$project->fluidBoard = 0;
$project->deleted = '0';
$project->hasProduct = '';
return $project;
}
@@ -204,6 +205,31 @@ class tutorialModel extends model
return $projectStat;
}
/**
* Get execution stats for tutorial.
*
* @param string $browseType
* @access public
* @return array
*/
public function getExecutionStats($browseType = '')
{
$execution = $this->getProject();
$emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
$execution->hours = (object)$emptyHour;
$execution->leftTasks = '—';
$execution->teamMembers = array_keys($this->getTeamMembers());
$execution->teamCount = count($execution->teamMembers);
$execution->hasProduct = '';
$execution->multiple = '';
if($browseType and $browseType != 'all') $execution->name .= '-' . $browseType; // Fix bug #21096
$executionStat[$execution->id] = $execution;
return $executionStat;
}
/**
* Get tutorial stories.
*
@@ -320,6 +346,8 @@ class tutorialModel extends model
$execution->fluidBoard = 0;
$execution->hours = $hours;
$execution->burns = array(35, 35);
$execution->hasProduct = '';
$execution->multiple = '';
return $execution;
}