Skip to content

Commit

Permalink
Fixed issue #10500: "Now" - "Tomorrow" used as min/max dates disfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 11, 2016
1 parent a97176c commit c7fb7db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ public function _CreateSubQLevelRelevanceAndValidationEqns($onlyThisQseq=NULL)
}

$sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK";
$sq_name = '(is_empty(' . $sq_name . ') || ('. $sq_name . ' >= date("Y-m-d H:i", strtotime(' . $date_min . ')) ))';
//$sq_name = '(is_empty(' . $sq_name . ') || ('. $sq_name . ' >= date("Y-m-d H:i", strtotime(' . $date_min . ')) ))';
$subqValidSelector = '';
break;
default:
Expand Down

6 comments on commit c7fb7db

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on c7fb7db May 11, 2016

Choose a reason for hiding this comment

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

This remove the control in Expression Manager control for "now" or other english string.

capture du 2016-05-11 16-33-50

And i think it broke all control on min_date too.

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

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

the control is done by the Date component itself 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.

Really ???? We don't control input by user in survey in PHP now. Not only only in JS.

And you must fix https://bugs.limesurvey.org/file_download.php?file_id=7974&type=bug

Did you try with dropdown ?

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

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

well, the line I removed is for JavaScript validation.
Could you be more precise about the thing to fix in the picture?

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on c7fb7db May 11, 2016

Choose a reason for hiding this comment

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

The color for help string is red : but the answer is OK (see validation NOW.NAOK : always broken)

And Expression Manager system does the 2 : javascript validation + PHP validation. With same string. Maybe not the best : but is the actual solution.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any news : did we validate answers with PHP or not ?

Please sign in to comment.