Skip to content

Commit

Permalink
Dev: Add TODO regarding warning class OOP
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Nov 11, 2019
1 parent 7711b75 commit 3648e3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -9939,6 +9939,7 @@ static public function ShowSurveyLogicFile($sid, $gid=NULL, $qid=NULL,$LEMdebugL
/* Construct the warnings */
$sWarningsText = "";
if(count($aWarnings) > 0) {
// TODO: Factor out in warning classes OOP
$sWarningsText .= "<div class='alert alert-warning'>";
$sWarningsText .= "<strong class=''>".$LEM->ngT("This question has at least {n} warning.|This question has at least {n} warnings.",count($aWarnings))."</strong>";
$sWarningsText .= "<ul class='list-unstyled small text-warning'>";
Expand Down

6 comments on commit 3648e3c

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i review some other part:

Test : strtoupper(Q00) > intval(Q01) : all function send NUMBER … even if it's string function.

@olleharstedt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which all function?

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function

private function RDP_RunFunction($funcNameToken, $params)

return (always) NUMBER

$token = array($result, $funcNameToken[1], 'NUMBER');
for token[2] even with join or strtoupper or …

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion :

  1. JS function must be fixed to always return string String or ''+
  2. PHP function must have a option to set token[2] to the good values.

@olleharstedt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew. Sounds deep. Too deep for me right now.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I make a report showing the issue (with warning …)

Please sign in to comment.