diff --git a/classes/api.php b/classes/api.php index 4ed10ef..c29753f 100644 --- a/classes/api.php +++ b/classes/api.php @@ -42,6 +42,8 @@ use mod_verbalfeedback\utils\instance; use mod_verbalfeedback\utils\user_utils; +// Quick hack for issue #43. +ini_set('memory_limit', '256M'); /** * Class for performing DB actions for the verbal feedback activity module. diff --git a/edit_instance.php b/edit_instance.php index c4e8206..bb0336a 100644 --- a/edit_instance.php +++ b/edit_instance.php @@ -49,6 +49,9 @@ require_login($course, true, $cm); +// Quick hack for issue #43. +ini_set('memory_limit', '256M'); + $instancerepository = new instance_repository(); if (!$instance = $instancerepository->get_by_id($cm->instance)) { diff --git a/questionnaire.php b/questionnaire.php index c97b003..c337379 100644 --- a/questionnaire.php +++ b/questionnaire.php @@ -45,6 +45,9 @@ require_login($course, true, $cm); +// Quick hack for issue #43. +ini_set('memory_limit', '256M'); + $context = context_module::instance($cm->id); $instancerepository = new instance_repository(); $submissionrepository = new submission_repository(); diff --git a/report.php b/report.php index c9b2e6f..0f12c0c 100644 --- a/report.php +++ b/report.php @@ -36,6 +36,9 @@ require_login($course, true, $cm); +// Quick hack for issue #43. +ini_set('memory_limit', '256M'); + $context = context_module::instance($cm->id); $instancerepo = new instance_repository(); @@ -51,9 +54,6 @@ throw new moodle_exception('errorreportnotavailable', 'mod_verbalfeedback'); } -// Quick hack for issue #43. -ini_set('memory_limit', '256M'); - $PAGE->set_context($context); $PAGE->set_cm($cm, $course); $PAGE->set_pagelayout('incourse');