|
[
Permalink
| « Hide
]
Matt Campbell added a comment - 26/Apr/07 11:26 PM
Small discussion at http://moodle.org/mod/forum/discuss.php?d=70156#p314685
I do NOT see this problem at all in my recently updated Moodle 1.8.
Joseph Using PHP4 I had same problem and I looked at edit.php. Line 130 has a foreach that was never being entered because the $fromform->categories was a single scalar value. Commented that out and did an assignment that only works for one category: if (empty($fromform->notcategorised) && isset($fromform->categories)) { So either PHP4's foreach behaves differently or PHP4 is involved in $fromform->categories not being an array. After testing on PHP5 I noticed that the category list allows multiple selections, while in my php4 environment, it is a single-select. This seems directly related to the fact that the variable coming back is not an array.
Problem in edit_form.php. Line 38.
Change $categoriesEl = $mform->... to $categoriesEl =& $mform-> Confirmed that adding the & to line 38 as recommended by Alexander Pavlyutin fixes this issue when using PHP4. Could someone check this on PHP5?
I have tested on Apache2/PHP5 and Apache1.x/PHP4. Both work fine now. They both display a multiselect input and record the selected category for the entry.
BTW - Comment just posted should have been explicit: I was using Alexander's fix.
fixed in cvs, thanks for the report and patch!
Where is the edit_form.php? There isn't such a file in the glossary - i've only got edit.php and editcategories.php!!
Thanks in advance! Andrea Could you confirm that you are using Moodle 1.8.x? edit_form.php was introduced in 1.8 and would not exist in an earlier version of Moodle.
Thanks, I would suspect that something didn't completely install, then. Is this installation working as you would expect, or are you having problems? How did you download this? What version do you have in /mod/glossary/version.php?
Thanks, No everything on the site works completely fine and has done for a few months now. Just finding this problem now. Code from version.php below:
<?php // $Id: version.php,v 1.56 2007/02/02 13:02:28 moodler Exp $ ///////////////////////////////////////////////////////////////////////////////// $module->version = 2007020200; ?> Thanks again |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||