[ Index ]

PHP Cross Reference of Moodle 310

title

Body

[close]

/question/tests/behat/ -> delete_question_activities.feature (source)

   1  @core @core_question
   2  Feature: An activity module instance with questions in its context can be deleted
   3    In order to delete an activity module from the course
   4    As a teacher
   5    I need to be able to delete the activity even if it has questions created in its context
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11      And the following "courses" exist:
  12        | fullname | shortname | format |
  13        | Course 1 | C1 | weeks |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17  
  18    @javascript
  19    Scenario: Synchronously deleting a quiz with existing questions in its context
  20      Given the following config values are set as admin:
  21        | coursebinenable | 0 | tool_recyclebin |
  22      And the following "activity" exists:
  23        | activity | quiz           |
  24        | course   | C1             |
  25        | name     | Test quiz Q001 |
  26      And the following "question categories" exist:
  27        | contextlevel    | reference      | name                       |
  28        | Activity module | Test quiz Q001 | Default for Test quiz Q001 |
  29      And the following "questions" exist:
  30        | questioncategory           | qtype     | name                             | questiontext                  |
  31        | Default for Test quiz Q001 | truefalse | Test used question to be deleted | Write about whatever you want |
  32      And quiz "Test quiz Q001" contains the following questions:
  33        | question                         | page |
  34        | Test used question to be deleted | 1    |
  35      And I am on the "Course 1" course page logged in as teacher1
  36      And I am on "Course 1" course homepage with editing mode on
  37      When I delete "Test quiz Q001" activity
  38      Then I should not see "Test quiz Q001"


Generated: Wed Jan 22 11:59:49 2025 Cross-referenced by PHPXref 0.7.1