diff --git a/backup/backup_form.html b/backup/backup_form.html
index 2437564384a..2aecf60d2e1 100644
--- a/backup/backup_form.html
+++ b/backup/backup_form.html
@@ -15,7 +15,7 @@
}
}
} else {
- if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
+ if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM))) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
@@ -142,8 +142,9 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
$modname = $mod->name;
$modbackup = $modname."_backup_mods";
//If exists the lib & function
- $var = "exists_".$modname;
- if (isset($$var) && $$var) {
+ $var = 'exists_'.$modname;
+ $exvar = 'exists_one_'.$modname;
+ if (!empty($$var) and !empty($$exvar)) {
//Print the full tr
echo "
";
echo " | ";
@@ -166,29 +167,25 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo '';
}
echo " |
\n";
- // if we have the backup_one_mod function, loop here.
- $var = 'exists_one_'.$modname;
- if (!empty($$var)) {
- echo ' | |
';
}
}
//Line