MDL-81790 report_log: Log report page per activities

* When clicking on the More / Logs menu in an activity we
should stay on the activity page and not go on the course
report log
This commit is contained in:
Laurent David
2025-01-15 09:41:08 +01:00
parent f4f166695c
commit b0c19ef4a8
5 changed files with 236 additions and 37 deletions
+27 -3
View File
@@ -103,6 +103,9 @@ class report_log_renderable implements renderable {
*/
public $grouplist;
/** @var bool if the page is activity page */
public $isactivitypage;
/**
* Constructor.
*
@@ -123,10 +126,30 @@ class report_log_renderable implements renderable {
* @param int $page (optional) page number.
* @param int $perpage (optional) number of records to show per page.
* @param string $order (optional) sortorder of fetched records
* @param string $origin (optional) origin of the event.
* @param bool $isactivitypage (optional) if the page is activity page.
*/
public function __construct($logreader = "", $course = 0, $userid = 0, $modid = 0, $action = "", $groupid = 0, $edulevel = -1,
$showcourses = false, $showusers = false, $showreport = true, $showselectorform = true, $url = "", $date = 0,
$logformat='showashtml', $page = 0, $perpage = 100, $order = "timecreated ASC", $origin ='') {
public function __construct(
$logreader = "",
$course = 0,
$userid = 0,
$modid = 0,
$action = "",
$groupid = 0,
$edulevel = -1,
$showcourses = false,
$showusers = false,
$showreport = true,
$showselectorform = true,
$url = "",
$date = 0,
$logformat='showashtml',
$page = 0,
$perpage = 100,
$order = "timecreated ASC",
$origin ='',
bool $isactivitypage = false,
) {
global $PAGE;
@@ -171,6 +194,7 @@ class report_log_renderable implements renderable {
$this->showselectorform = $showselectorform;
$this->logformat = $logformat;
$this->origin = $origin;
$this->isactivitypage = $isactivitypage;
}
/**