| Línea 46... |
Línea 46... |
| 46 |
* @param string|null $capabilityforintro capability to check before including intro info in the results.
|
46 |
* @param string|null $capabilityforintro capability to check before including intro info in the results.
|
| 47 |
* null means always include (the default).
|
47 |
* null means always include (the default).
|
| 48 |
* @return array with the containing all the values declared in {@see standard_coursemodule_elements_returns()}.
|
48 |
* @return array with the containing all the values declared in {@see standard_coursemodule_elements_returns()}.
|
| 49 |
*/
|
49 |
*/
|
| 50 |
public static function standard_coursemodule_element_values(\stdClass $modinstance, string $component,
|
50 |
public static function standard_coursemodule_element_values(\stdClass $modinstance, string $component,
|
| 51 |
string $capabilityforgroups = 'moodle/course:manageactivities', string $capabilityforintro = null): array {
|
51 |
string $capabilityforgroups = 'moodle/course:manageactivities', ?string $capabilityforintro = null): array {
|
| 52 |
self::format_name_and_intro($modinstance, $component);
|
52 |
self::format_name_and_intro($modinstance, $component);
|
| 53 |
$context = context_module::instance($modinstance->coursemodule);
|
53 |
$context = context_module::instance($modinstance->coursemodule);
|
| Línea 54... |
Línea 54... |
| 54 |
|
54 |
|
| 55 |
// First, we return information that any user can see in the web interface.
|
55 |
// First, we return information that any user can see in the web interface.
|