first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,29 @@
@block @block_calendar_upcoming
Feature: Enable the upcoming events block in a course
In order to enable the calendar block in a course
As a teacher
I can view the event in the upcoming events block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| calendar_upcoming | System | 1 | my-index | side-post |
@javascript
Scenario: View a site event in the calendar block
Given I log in as "admin"
And I create a calendar event with form data:
| id_eventtype | Site |
| id_name | My Site Event |
And I log out
When I log in as "teacher1"
Then I should see "My Site Event" in the "Upcoming events" "block"
@@ -0,0 +1,20 @@
@block @block_calendar_upcoming
Feature: View a upcoming site event on the dashboard
In order to view a site event
As a student
I can view the event in the upcoming events block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
@javascript
Scenario: View a site event in the upcoming events block on the dashboard
Given I log in as "admin"
And I create a calendar event with form data:
| id_eventtype | Site |
| id_name | My Site Event |
And I log out
When I log in as "student1"
And I hover over today in the mini-calendar block
Then I should see "My Site Event"
@@ -0,0 +1,24 @@
@block @block_calendar_upcoming
Feature: View a site event on the frontpage
In order to view a site event
As a teacher
I can view the event in the upcoming events block
Background:
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| calendar_upcoming | System | 1 | site-index | side-pre |
@javascript
Scenario: View a site event in the upcoming events block on the frontpage
Given I log in as "admin"
And I create a calendar event with form data:
| id_eventtype | Site |
| id_name | My Site Event |
And I log out
When I log in as "teacher1"
And I am on site homepage
Then I should see "My Site Event" in the "Upcoming events" "block"
@@ -0,0 +1,26 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Calendar upcoming events block data generator class.
*
* @package block_calendar_upcoming
* @category test
* @copyright 2021 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class block_calendar_upcoming_generator extends testing_block_generator {
}