Skip to content
Snippets Groups Projects
Commit a995c5a4 authored by Aleix Quintana's avatar Aleix Quintana Committed by Devin Zuczek
Browse files

Issue #2387753 by aleix: errors in function quiz_validate with strings quiz_open and quiz_close

parent a4f44057
No related branches found
No related tags found
No related merge requests found
......@@ -1431,8 +1431,8 @@ function _quiz_userpoints_type() {
function quiz_validate($node) {
// Don't check dates if the quiz is always available.
if (!$node->quiz_always) {
if (mktime(0, 0, 0, $node->quiz_open['month'], $node->quiz_open['day'], $node->quiz_open['year']) > mktime(0, 0, 0, $node->quiz_close['month'], $node->quiz_close['day'], $node->quiz_close['year'])) {
form_set_error('quiz_close', t('"Close date" must be later than the "open date".'));
if ($node->quiz_open > $node->quiz_close) {
form_set_error('quiz_close', t('The End date must be greater than the Open date.'));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment