* [bug#55391] Can batch create story in tutrial.

This commit is contained in:
xieqiyu
2024-09-14 11:02:29 +08:00
committed by 胡方舟
parent bbf92b8ba6
commit d8d22978a4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -5290,7 +5290,7 @@ class storyModel extends model
*/
public function getGradeOptions(object|bool $story, string $storyType, array $appendList = array()): array
{
if(!$story) return $this->getGradePairs($storyType, 'enable', $appendList);
if(!$story || common::isTutorialMode()) return $this->getGradePairs($storyType, 'enable', $appendList);
$gradeOptions = array();
if($storyType != $story->type)
+1 -1
View File
@@ -1996,7 +1996,7 @@ class storyTao extends storyModel
/* Batch create button. */
$shadow = $this->dao->findByID($story->product)->from(TABLE_PRODUCT)->fetch('shadow');
$canBatchCreateStory = common::hasPriv($story->type, 'batchcreate') && $this->isClickable($story, 'batchcreate') && $story->grade < $maxGradeGroup[$story->type] && empty($story->hasOtherTypeChild);
$canBatchCreateStory = (common::hasPriv($story->type, 'batchcreate') && $this->isClickable($story, 'batchcreate') && $story->grade < $maxGradeGroup[$story->type] && empty($story->hasOtherTypeChild)) || common::isTutorialMode();
if(!($this->app->rawModule == 'projectstory' && $this->app->rawMethod == 'story') || $this->config->vision == 'lite' || $shadow)
{
if($shadow and empty($taskGroups[$story->id])) $taskGroups[$story->id] = $this->dao->select('id')->from(TABLE_TASK)->where('story')->eq($story->id)->fetch('id');