View Issue Details

IDProjectCategoryView StatusLast Update
17380Development Otherpublic2021-06-23 18:07
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version4.x.0-dev 
Summary17380: Question theme has ambiguous columns
Descriptioncore_theme represents that is a theme delivered from LS.
Still, the name implies that it is a theme representing a plain question_type.

extends is overlapping with question_type. Probably should be a bool?
TagsNo tags attached.

Relationships

related to 17350 resolvedgabrieljenik Question theme should be a separate database column, not an attribute 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2021-06-22 14:57

manager  

image.png (12,266 bytes)   
image.png (12,266 bytes)   
ollehar

ollehar

2021-06-22 15:36

administrator   ~64975

core_theme should rather be theme_type, taking "core", "custom", and "user" as values.
ollehar

ollehar

2021-06-22 15:36

administrator   ~64976

Last edited: 2021-06-23 18:07

View 2 revisions

I think in some places in the code, it assumes core == 1 *if* extends == '' (empty string). So yeah. Needs to be reviewed.
gabrieljenik

gabrieljenik

2021-06-22 17:23

manager   ~64992

Last edited: 2021-06-23 18:07

> core_theme should rather be theme_type, taking "core", "custom", and "user" as values.

I suggest just changing the name of the columns, rather than changing its data contents.
It will be a less impact change.

On the other side, what would be the difference in between "custom" and "user"?
ollehar

ollehar

2021-06-22 17:33

administrator   ~64993

Last edited: 2021-06-23 18:07

"custom" is built-in, inside the git repo BUT extending an existing theme. "user" is uploaded question theme, no in git repo.
ollehar

ollehar

2021-06-22 17:33

administrator   ~64994

Last edited: 2021-06-23 18:07

> I suggest just changing the name of the columns, rather than changing its data contents.

Change to what?
gabrieljenik

gabrieljenik

2021-06-23 18:01

manager   ~65032

Last edited: 2021-06-23 18:07

core_theme -> standard
gabrieljenik

gabrieljenik

2021-06-23 18:03

manager   ~65033

Last edited: 2021-06-23 18:07

Joinning the change of name I would add these to the class:

    /**
     * If a question theme doesn't extend any question type.
     * Ex: question types.
     */
    public function isBase()
    {

    }

    /**
     * If a question theme does extend a quesiton type.
     * This can be a user generated one or created by Lime (Ex:bootstrap-buttons)
     */
    public function isCustom()
    {

    }

    /**
     * If a question theme was created by Lime.
     */
    public function isStandard()
    {

    }

As well as new scopes for allowing better future usage

What do you think?

As per the extends column, the type should be reviewed, but I would do that on a different story

Issue History

Date Modified Username Field Change
2021-06-22 14:57 gabrieljenik New Issue
2021-06-22 14:57 gabrieljenik File Added: image.png
2021-06-22 14:57 gabrieljenik Issue generated from: 17350
2021-06-22 14:57 gabrieljenik Relationship added related to 17350
2021-06-22 15:36 ollehar Note Added: 64975
2021-06-22 15:36 ollehar Note Added: 64976
2021-06-22 15:36 ollehar Note Edited: 64976 View Revisions
2021-06-22 17:23 gabrieljenik Note Added: 64992
2021-06-22 17:33 ollehar Note Added: 64993
2021-06-22 17:33 ollehar Note Added: 64994
2021-06-23 18:01 gabrieljenik Note Added: 65032
2021-06-23 18:03 gabrieljenik Note Added: 65033
2021-06-23 18:07 gabrieljenik Assigned To => gabrieljenik
2021-06-23 18:07 gabrieljenik Status new => assigned