Hide the metacourse dropdown menu if the course
isn't a metacourse and general XHTML compliance. MDL-9922 Merged from MOODLE_18_STABLE
This commit is contained in:
+12
-6
@@ -117,6 +117,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
<form id="form1" method="post" action="backup.php">
|
||||
<table cellpadding="5" style="margin-left:auto;margin-right:auto;">
|
||||
<?php
|
||||
/// Acummulator for hidden options and proper XHTML output
|
||||
$hidden_options = '';
|
||||
//Now, check modules and info and show posibilities
|
||||
if ($allmods = get_records("modules") ) {
|
||||
//Print option to select/deselect everything with 1 click.
|
||||
@@ -192,7 +194,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
//Line
|
||||
echo "<tr><td colspan=\"4\"><hr /></td></tr>\n";
|
||||
|
||||
if (empty($to)) {
|
||||
if (empty($to) && !empty($course->metacourse)) {
|
||||
//Now print the Metacourse tr
|
||||
echo "<tr>";
|
||||
echo "<td align=\"right\" colspan=\"2\"><b>";
|
||||
@@ -204,7 +206,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
echo '<input type="hidden" name="backup_metacourse" value="0" />';
|
||||
$hidden_options .= '<input type="hidden" name="backup_metacourse" value="0" />';
|
||||
}
|
||||
|
||||
if (empty($to)) {
|
||||
@@ -220,7 +222,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
echo '<input type="hidden" name="backup_users" value="0" />';
|
||||
$hidden_options .= '<input type="hidden" name="backup_users" value="0" />';
|
||||
}
|
||||
|
||||
if (empty($to)) {
|
||||
@@ -235,7 +237,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
echo '<input type="hidden" name="backup_logs" value="0" />';
|
||||
$hidden_options .= '<input type="hidden" name="backup_logs" value="0" />';
|
||||
}
|
||||
|
||||
if (empty($to)) {
|
||||
@@ -250,7 +252,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
echo '<input type="hidden" name="backup_user_files" value="0" />';
|
||||
$hidden_options .= '<input type="hidden" name="backup_user_files" value="0" />';
|
||||
}
|
||||
//Now print the Course Files tr
|
||||
echo "<tr>";
|
||||
@@ -298,7 +300,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
echo '<input type="hidden" name="backup_messages" value="0" />';
|
||||
$hidden_options .= '<input type="hidden" name="backup_messages" value="0" />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,6 +314,10 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
/// Print captured hidden options, now that we have closed the table
|
||||
echo $hidden_options;
|
||||
?>
|
||||
|
||||
<div style="text-align:center;margin-left:auto;margin-right:auto">
|
||||
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
||||
|
||||
Reference in New Issue
Block a user