Reported at https://mahara.org/interaction/forum/topic.php?id=5960
A non-site administrator wants to change the editability dates for a CSV-created group and gets the following errors when setting either the start or the end date under Editability:
[WAR] 7f (lib/form/elements/wysiwyg.php:87) Invalid argument supplied for foreach()
Call stack (most recent first):
log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/form/element...", 87) at /home/kristina/code/mahara/htdocs/lib/errors.php:430
error(2, "Invalid argument supplied for foreach()", "/home/kristina/code/mahara/htdocs/lib/form/element...", 87, array(size 2)) at /home/kristina/code/mahara/htdocs/lib/form/elements/wysiwyg.php:87
pieform_element_wysiwyg_get_headdata(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1667
pieform_get_headdata() at /home/kristina/code/mahara/htdocs/lib/web.php:87
smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at /home/kristina/code/mahara/htdocs/lib/errors.php:565
MaharaException->handle_exception() at /home/kristina/code/mahara/htdocs/lib/errors.php:456
exception(object(AccessDeniedException)) at Unknown:0
[WAR] 7f (lib/form/elements/wysiwyg.php:94) Invalid argument supplied for foreach()
Call stack (most recent first):
log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/form/element...", 94) at /home/kristina/code/mahara/htdocs/lib/errors.php:430
error(2, "Invalid argument supplied for foreach()", "/home/kristina/code/mahara/htdocs/lib/form/element...", 94, array(size 2)) at /home/kristina/code/mahara/htdocs/lib/form/elements/wysiwyg.php:94
pieform_element_wysiwyg_get_headdata(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1667
pieform_get_headdata() at /home/kristina/code/mahara/htdocs/lib/web.php:87
smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at /home/kristina/code/mahara/htdocs/lib/errors.php:565
MaharaException->handle_exception() at /home/kristina/code/mahara/htdocs/lib/errors.php:456
exception(object(AccessDeniedException)) at Unknown:0
======================
Reproduce:
1. Set up a group by CSV.
2. Make a non-site admin admin of the group.
3. Change the start or end date under Editability in the group settings.
4. Expected result: the change is made. Actual result: Above warnings.
Everything works fine when the group is created manually.
This was fixed elsewhere as I don't get the error message anymore.