Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Variables
tabs.php File Reference

Sets up the tabs used by the lesson pages for teachers. More...

Variables

 $attemptscount = $DB->count_records('lesson_grades', array('lessonid'=>$lesson->id))
 user attempt count for reports link hover (completed attempts - much faster)
 
global $DB
 This file to be included so we can assume config.php has already been included.
 
 $row [] = new tabobject('view', "$CFG->wwwroot/mod/lesson/view.php?id=$cm->id", get_string('preview', 'lesson'), get_string('previewlesson', 'lesson', format_string($lesson->name)))
 
if(empty( $lesson)) if(!isset($currenttab)) if(!isset( $cm)) if(!isset($course)) $tabs = $row = $inactive = $activated = array()
 
if(has_capability( 'mod/lesson:viewreports', $context)) if(has_capability('mod/lesson:grade', $context)) $tabs [] = $row
 

Detailed Description

Sets up the tabs used by the lesson pages for teachers.

This file was adapted from the mod/quiz/tabs.php

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late