* Fix bug #31439.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user