mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Give groupmode selection to mod.html for all modules that use groupmode. Also fix bug 2576
This commit is contained in:
parent
6c3512329b
commit
1ee55c41d9
@ -1824,7 +1824,11 @@ function print_groupmode_setting($form, $course=NULL) {
|
||||
* Print visibility setting form element on module setup forms in mod/.../mod.html
|
||||
*/
|
||||
function print_visible_setting($form, $course=NULL) {
|
||||
|
||||
if (empty($course)) {
|
||||
if (! $course = get_record('course', 'id', $form->course)) {
|
||||
error("This course doesn't exist");
|
||||
}
|
||||
}
|
||||
if ($form->coursemodule) {
|
||||
$visible = get_field('course_modules', 'visible', 'id', $form->coursemodule);
|
||||
} else {
|
||||
|
@ -71,14 +71,14 @@
|
||||
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
|
||||
} else {
|
||||
emoticonhelpbutton("form", "text");
|
||||
}
|
||||
}
|
||||
echo "<br />";
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text);
|
||||
|
||||
|
||||
if ($usehtmleditor) {
|
||||
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
|
||||
} else {
|
||||
@ -89,7 +89,7 @@
|
||||
if (!$form->format) {
|
||||
$form->format = $defaultformat;
|
||||
}
|
||||
choose_from_menu(format_text_menu(), "format", $form->format, "");
|
||||
choose_from_menu(format_text_menu(), "format", $form->format, "");
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
@ -162,7 +162,7 @@
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("choiceopen", "choice") ?>:</b></td>
|
||||
<td>
|
||||
|
||||
|
||||
<?php
|
||||
if (!$form->timeopen and $course->format == "weeks") {
|
||||
$form->timeopen = $course->startdate + (($form->section - 1) * 608400);
|
||||
@ -170,7 +170,7 @@
|
||||
print_date_selector("openday", "openmonth", "openyear", $form->timeopen);
|
||||
print_time_selector("openhour", "openminute", $form->timeopen);
|
||||
?>
|
||||
|
||||
|
||||
<input type="hidden" name="hopenday" value="0" />
|
||||
<input type="hidden" name="hopenmonth" value="0" />
|
||||
<input type="hidden" name="hopenyear" value="0" />
|
||||
@ -181,7 +181,7 @@
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("choiceclose", "choice") ?>:</b></td>
|
||||
<td>
|
||||
|
||||
|
||||
<?php
|
||||
if (!$form->timeclose and $course->format == "weeks") {
|
||||
$form->timeclose = $course->startdate + (($form->section) * 608400);
|
||||
@ -189,7 +189,7 @@
|
||||
print_date_selector("closeday", "closemonth", "closeyear", $form->timeclose);
|
||||
print_time_selector("closehour", "closeminute", $form->timeclose);
|
||||
?>
|
||||
|
||||
|
||||
<input type="hidden" name="hcloseday" value="0" />
|
||||
<input type="hidden" name="hclosemonth" value="0" />
|
||||
<input type="hidden" name="hcloseyear" value="0" />
|
||||
@ -258,7 +258,7 @@
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<?php print_visible_setting($form); ?>
|
||||
<?php print_standard_coursemodule_settings($form); ?>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
if (!isset($form->content)) {
|
||||
$form->content = '';
|
||||
}
|
||||
@ -17,7 +17,7 @@
|
||||
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
|
||||
} else {
|
||||
emoticonhelpbutton("form", "description");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
</font>
|
||||
@ -28,7 +28,7 @@
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php print_visible_setting($form); ?>
|
||||
</table>
|
||||
<!-- these hidden variables are always the same -->
|
||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||
|
@ -197,13 +197,13 @@
|
||||
else {
|
||||
$strchooseafile = get_string("chooseafile", "wiki");
|
||||
echo "<input type=\"text\" name=\"initialcontent\" size=\"50\" value=\"$form->initialcontent\" alt=\"".get_string("initialcontent", "wiki")."\" /> ";
|
||||
button_to_popup_window ("/files/index.php?choose=form.initialcontent&id=$course->id",
|
||||
button_to_popup_window ("/files/index.php?choose=form.initialcontent&id=$course->id",
|
||||
"wikifiles", $strchooseafile, 500, 750, $strchooseafile);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php print_visible_setting($form); ?>
|
||||
<?php print_standard_coursemodule_settings($form); ?>
|
||||
</table>
|
||||
<!-- These hidden variables are always the same -->
|
||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||
|
@ -329,7 +329,7 @@
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("usepassword", "workshop"); ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "usepassword", $form->usepassword, "");
|
||||
helpbutton("usepassword", get_string("usepassword", "workshop"), "workshop");
|
||||
@ -419,7 +419,7 @@
|
||||
helpbutton("releasegrades", get_string("releaseteachergrades", "workshop"), "workshop");
|
||||
?></td>
|
||||
</tr>
|
||||
<?php print_visible_setting($form); ?>
|
||||
<?php print_standard_coursemodule_settings($form); ?>
|
||||
</table>
|
||||
<br />
|
||||
<center>
|
||||
|
Loading…
x
Reference in New Issue
Block a user