MDL-75335 mod_data: Zero state for Fields and Templates

This commit is contained in:
Amaia Anabitarte
2022-10-25 16:35:58 +02:00
parent 32c8f75c0d
commit ab97d41644
25 changed files with 264 additions and 118 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ if (isguestuser()) {
}
/// Can't use this if there are no fields
if (has_capability('mod/data:managetemplates', $context)) {
if ($manager->can_manage_templates()) {
if (!$manager->has_fields()) {
redirect($CFG->wwwroot.'/mod/data/field.php?d='.$data->id); // Redirect to field entry.
}