The signup end date field is not properly populated after a "Course" is created.
To reproduce:
- Install classroom.
- Create a content-type for your classes.
- Assign the "Course" type to the content-type you've created.
- Create a class (course). Set the signup end date to something in the future.
- Save your class.
- Look at the signup end date value again.
The Signup End Date is coming back as today's date; not the date I assigned it.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | clasroom-signup-end-date-not-populated-893314-4.patch | 1.82 KB | wjaspers |
Comments
Comment #1
wjaspers commentedNote: The database IS storing the correct value for this field.
Therefore, I would assume the bug lies strictly in the code meant to create the class' administrative form.
Comment #2
wjaspers commentedProblem is persistent in 1.1
Comment #3
wjaspers commentedFound it!
In File: classroom.courses.inc
On Line: 241
Near:
Replace:
With:
Comment #4
wjaspers commentedAlso included some minor PHP fixes for incorrect syntax.
Comment #5
imobachgs commentedHi wjaspers,
What a stupid typo! :) Thank you!
About your patch, I've got a question: why is incorrect using 'and' operator instead of '&&'? I think that the only difference is the precedence.
Anyway, I'll commit your fix in a few hours.
Regards.
Comment #6
wjaspers commentedDon't sweat it!
I switched the AND's to && because keeps your code consistent. Not to mention, I thought any pseudo-code you may have had got in and was affecting this.
PHP is currently nice enough to interpret it correctly; but there's no guarantee that functionality is permanent.
Plus, if plain-text comparison operators (AND | OR | XOR) were to become language (english, spanish, etc...) dependent, your code may not run.
Comment #7
imobachgs commentedHi,
I've commited the fix. We'll consider changing 'and' with '&&' through all the code in a near future.
Thank you wjaspers!