Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 119 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/tests/task/show_started_courses_task_test.php

Defines 1 class

hide_ended_courses_task_test:: (1 method):
  test_hide_ended_courses()


Class: hide_ended_courses_task_test  - X-Ref

Class containing unit tests for the hide ended courses task.

It automatically sets the course visibility to hidden when the course end date matches the current day.

test_hide_ended_courses(int $nextweekvisible,int $yesterdayvisible,int $tomorrowvisible,bool $createhidden = true)   X-Ref
Test hide_ended_courses cron task.

param: int $nextweekvisible Number of courses with the end date set to next week to be created.
param: int $yesterdayvisible Number of courses with the end date set to yesterday to be created.
param: int $tomorrowvisible Number of courses with the end date set to tomorrow to be created.
param: bool $createhidden Whether hidden courses should be created or not.