euphorie / Euphorie

Euphorie is a tool for risk assessment
https://pythonhosted.org/Euphorie/
GNU General Public License v2.0
11 stars 6 forks source link

Support scaled answers #715

Closed mauritsvanrees closed 2 months ago

mauritsvanrees commented 3 months ago

Add support for scaled answers. Usually: answers on a scale of 1-5. This includes improvements in the navigation, mostly creating more possibilities for overriding code. This seems safe enough to be merged and used, also when the specific project does not use the new scaled answer possibilities. We could also split this up into multiple PRs, and do git rebases, to make this easier to digest.

mauritsvanrees commented 3 months ago

@ale-rt I made navigation_tree_legend a property as you requested. I have pushed the same change to the daimler.oira branch.

ale-rt commented 3 months ago

@ale-rt I made navigation_tree_legend a property as you requested. I have pushed the same change to the daimler.oira branch.

I meant something like this: https://github.com/euphorie/Euphorie/pull/716 I moved that property to an attribute. It can still be customized with a property.

mauritsvanrees commented 3 months ago

Ah, sorry, now I get it. Makes sense. I have merged your PR.

mauritsvanrees commented 2 months ago

@ale-rt and me are splitting this up into multiple PRs so it is more understandable.

mauritsvanrees commented 2 months ago

The alternative PRs have been merged. We are done here.

ale-rt commented 2 months ago

Almost, I merged main in the multiple answer branch and now I have only this thing left:

--- a/src/euphorie/client/browser/risk.py
+++ b/src/euphorie/client/browser/risk.py
@@ -1245,7 +1245,9 @@ class ActionPlanView(RiskBase):

     @property
     def risk_postponed(self):
-        return self.context.identification is None
+        return (
+            self.context.identification is None and self.context.scaled_answer is None
+        )

     @property
     def use_problem_description(self):
ale-rt commented 2 months ago

^ This was removed on purpose :)