Skip to content

Commit a8d5a7c

Browse files
committed
Survey: Fix duplication
1 parent 20dabe6 commit a8d5a7c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

main/survey/survey.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function generate_unique_code($code)
5858
*/
5959
public static function checkUniqueCode($surveyCode)
6060
{
61-
if (empty($courseCode)) {
61+
if (empty($surveyCode)) {
6262
return false;
6363
}
6464
$courseId = api_get_course_int_id();

tests/behat/features/toolSurvey.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Feature: Survey tool
5151
Scenario: Duplicate survey
5252
Given I am on "/main/survey/survey_list.php?cidReq=TEMP"
5353
And I follow "Duplicate survey"
54+
And I press "Copy survey"
5455
Then I should see "Survey copied"
5556
And I should see "Survey 1 Copy"
5657

0 commit comments

Comments
 (0)