From f0e52f67df4b688f37d1862be73ebb3bafadc4ed Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 6 Jun 2006 08:53:54 +0000 Subject: [PATCH] Bug #5444 - Import PowerPoint - PHP5 clone bug; merged from MOODLE_16_STABLE --- mod/lesson/importppt.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/lesson/importppt.php b/mod/lesson/importppt.php index db29074827..6c0f2e2159 100644 --- a/mod/lesson/importppt.php +++ b/mod/lesson/importppt.php @@ -430,12 +430,12 @@ function lesson_create_objects($pageobjects, $lessonid) { $answer->answer = "Next"; $answer->response = ""; - $answers[] = $answer; + $answers[] = clone($answer); $answer->jumpto = LESSON_PREVIOUSPAGE; $answer->answer = "Previous"; - $answers[] = $answer; + $answers[] = clone($answer); $branchtable->answers = $answers; @@ -445,8 +445,8 @@ function lesson_create_objects($pageobjects, $lessonid) { $temp = prep_page($pageobject, $i); // makes our title and contents $page->title = $temp->title; $page->contents = $temp->contents; - $branchtable->page = $page; // add the page - $branchtables[] = $branchtable; // add it all to our array + $branchtable->page = clone($page); // add the page + $branchtables[] = clone($branchtable); // add it all to our array $i++; } -- 2.39.5