BRANCH MERGE

These are the changes from MOODLE_13_STABLE, merged into trunk

The tag MOODLE_13_MERGED on the MOODLE_13_STABLE branch now refers to this point

The biggest changes here are the fixes for HTML editor in all standard modules
This commit is contained in:
moodler 2004-06-04 06:17:30 +00:00
parent 308214e87e
commit 7613890851
49 changed files with 175 additions and 198 deletions

View file

@ -102,7 +102,7 @@
if ($primaryadmin->id == $admin->id){ if ($primaryadmin->id == $admin->id){
print_spacer(10, 9, false); print_spacer(10, 9, false);
} else { } else {
echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$admin->id\" echo "<a href=\"admin.php?remove=$admin->id\"
title=\"$strremoveadmin\"><img src=\"../pix/t/right.gif\" title=\"$strremoveadmin\"><img src=\"../pix/t/right.gif\"
border=0></A>"; border=0></A>";
} }
@ -136,14 +136,14 @@
} }
foreach ($users as $user) { foreach ($users as $user) {
echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"". echo "<p align=left><a href=\"admin.php?add=$user->id\"".
"title=\"$straddadmin\"><img src=\"../pix/t/left.gif\"". "title=\"$straddadmin\"><img src=\"../pix/t/left.gif\"".
"border=0></a>&nbsp;&nbsp;".fullname($user).", $user->email"; "border=0></a>&nbsp;&nbsp;".fullname($user).", $user->email";
} }
} }
if ($search or $usercount > MAX_USERS_PER_PAGE) { if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<form action={$_SERVER['PHP_SELF']} method=post>"; echo "<form action=admin.php method=post>";
echo "<input type=text name=search size=20>"; echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">"; echo "<input type=submit value=\"$searchstring\">";
echo "</form>"; echo "</form>";

View file

@ -95,7 +95,7 @@
foreach ($creators as $creator) { foreach ($creators as $creator) {
$creatorarray[] = $creator->id; $creatorarray[] = $creator->id;
echo "<p align=right>".fullname($creator, true).", $creator->email &nbsp;&nbsp; "; echo "<p align=right>".fullname($creator, true).", $creator->email &nbsp;&nbsp; ";
echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$creator->id\" echo "<a href=\"creators.php?remove=$creator->id\"
title=\"$strremovecreator\"><img src=\"../pix/t/right.gif\" title=\"$strremovecreator\"><img src=\"../pix/t/right.gif\"
border=0></a>"; border=0></a>";
echo "</p>"; echo "</p>";
@ -128,14 +128,14 @@
foreach ($users as $user) { foreach ($users as $user) {
$fullname = fullname($user, TRUE); $fullname = fullname($user, TRUE);
echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"". echo "<p align=left><a href=\"creators.php?add=$user->id\"".
"title=\"$straddcreator\"><img src=\"../pix/t/left.gif\"". "title=\"$straddcreator\"><img src=\"../pix/t/left.gif\"".
"border=0></a>&nbsp;&nbsp;$fullname, $user->email"; "border=0></a>&nbsp;&nbsp;$fullname, $user->email";
} }
} }
if ($search or $usercount > MAX_USERS_PER_PAGE) { if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<form action={$_SERVER['PHP_SELF']} method=post>"; echo "<form action=creators.php method=post>";
echo "<input type=text name=search size=20>"; echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">"; echo "<input type=submit value=\"$searchstring\">";
echo "</form>"; echo "</form>";

View file

@ -214,6 +214,8 @@
print_header(get_string('calendar', 'calendar').': '.$title, $site->fullname, $nav.' -> '.$title, print_header(get_string('calendar', 'calendar').': '.$title, $site->fullname, $nav.' -> '.$title,
$focus, '', true, '', '<p class="logininfo">'.user_login_string($site).'</p>'); $focus, '', true, '', '<p class="logininfo">'.user_login_string($site).'</p>');
echo calendar_overlib_html();
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%"><tr valign="top">'; echo '<table border="0" cellpadding="3" cellspacing="0" width="100%"><tr valign="top">';
echo '<td valign="top" width="100%">'; echo '<td valign="top" width="100%">';
@ -281,7 +283,7 @@
include('event_edit.html'); include('event_edit.html');
print_side_block_end(); print_side_block_end();
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("description");
} }
break; break;
@ -425,7 +427,7 @@
else { else {
include('event_new.html'); include('event_new.html');
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("description");
} }
} }
print_side_block_end(); print_side_block_end();
@ -437,7 +439,6 @@
echo '<td style="vertical-align: top; width: 180px;">'; echo '<td style="vertical-align: top; width: 180px;">';
$defaultcourses = calendar_get_default_courses(); $defaultcourses = calendar_get_default_courses();
echo calendar_overlib_html();
calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses); calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses);
print_side_block_start(get_string('monthlyview', 'calendar')); print_side_block_start(get_string('monthlyview', 'calendar'));

View file

@ -19,7 +19,7 @@
</td> </td>
<td> <td>
<?php <?php
print_textarea($usehtmleditor, 10, 65, 630, 400, "description", $form->description); print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
if (isset($err['description'])) formerr($err['description']); if (isset($err['description'])) formerr($err['description']);
?> ?>
</td> </td>

View file

@ -19,7 +19,7 @@
</td> </td>
<td> <td>
<?php <?php
print_textarea($usehtmleditor, 10, 65, 630, 200, "description", $form->description); print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
if (isset($err['description'])) formerr($err['description']); if (isset($err['description'])) formerr($err['description']);
?> ?>
</td> </td>

View file

@ -184,7 +184,7 @@
print_footer($course); print_footer($course);
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("summary");
} }
exit; exit;

View file

@ -58,7 +58,7 @@
print_simple_box_end(); print_simple_box_end();
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("summary");
} }
print_footer($course); print_footer($course);

View file

@ -95,7 +95,7 @@
include('group-edit.html'); include('group-edit.html');
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("description");
} }
print_footer(); print_footer();

View file

@ -622,6 +622,12 @@
if (file_exists($modform)) { if (file_exists($modform)) {
if ($usehtmleditor = can_use_html_editor()) {
$defaultformat = FORMAT_HTML;
} else {
$defaultformat = FORMAT_MOODLE;
}
$icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\">&nbsp;"; $icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\">&nbsp;";
print_heading_with_help($pageheading, "mods", $module->name, $icon); print_heading_with_help($pageheading, "mods", $module->name, $icon);
@ -629,6 +635,10 @@
include_once($modform); include_once($modform);
print_simple_box_end(); print_simple_box_end();
if ($usehtmleditor and empty($nohtmleditorneeded)) {
use_html_editor();
}
} else { } else {
notice("This module cannot be added to this course yet! (No file found at: $modform)", "$CFG->wwwroot/course/view.php?id=$course->id"); notice("This module cannot be added to this course yet! (No file found at: $modform)", "$CFG->wwwroot/course/view.php?id=$course->id");
} }

View file

@ -1654,11 +1654,11 @@ function use_html_editor($name="") {
echo "<script language=\"javascript\" type=\"text/javascript\" defer=\"1\">\n"; echo "<script language=\"javascript\" type=\"text/javascript\" defer=\"1\">\n";
if (empty($name)) { if (empty($name)) {
echo "HTMLArea.replaceAll();"; echo "HTMLArea.replaceAll();\n";
} else { } else {
echo "HTMLArea.replace('$name')"; echo "HTMLArea.replace('$name');\n";
} }
echo "</script>"; echo "</script>\n";
} }

View file

@ -1,9 +1,4 @@
<?php <?php
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
} else {
$defaultformat = FORMAT_MOODLE;
}
if (empty($form->name)) { if (empty($form->name)) {
$form->name = ""; $form->name = "";
} }
@ -30,15 +25,15 @@
} }
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding="5">
<tr valign=top> <tr valign="top">
<td align=right><p><b><?php print_string("assignmentname", "assignment") ?>:</b></p></td> <td align=right><p><b><?php print_string("assignmentname", "assignment") ?>:</b></p></td>
<td> <td>
<input type="text" name="name" size=60 value="<?php p($form->name) ?>"> <input type="text" name="name" size=60 value="<?php p($form->name) ?>">
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><b><?php print_string("description", "assignment") ?>:</b></p> <td align=right><p><b><?php print_string("description", "assignment") ?>:</b></p>
<font size="1"> <font size="1">
<?php <?php
@ -59,23 +54,27 @@
<?php <?php
print_textarea($usehtmleditor, 20, 60, 680, 400, "description", $form->description); print_textarea($usehtmleditor, 20, 60, 680, 400, "description", $form->description);
echo "<p align=right>"; if ($usehtmleditor) {
helpbutton("textformat", get_string("formattexttype")); echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
print_string("formattexttype"); } else {
echo ":&nbsp;"; echo '<p align="right">';
if (!$form->format) { helpbutton("textformat", get_string("formattexttype"));
$form->format = $defaultformat; print_string("formattexttype");
echo ':&nbsp;';
if (!$form->format) {
$form->format = $defaultformat;
}
choose_from_menu(format_text_menu(), "format", $form->format, "");
echo '</p>';
} }
choose_from_menu(format_text_menu(), "format", $form->format, "");
echo "</p>";
?> ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign="top">
<td align=right><p><b><?php print_string("assignmenttype", "assignment") ?>:</b></p></td> <td align=right><p><b><?php print_string("assignmenttype", "assignment") ?>:</b></p></td>
<td> <td>
<?php <?php
require("$CFG->dirroot/mod/assignment/lib.php"); require_once("$CFG->dirroot/mod/assignment/lib.php");
asort($ASSIGNMENT_TYPE); asort($ASSIGNMENT_TYPE);
choose_from_menu($ASSIGNMENT_TYPE, "type", $form->type, ""); choose_from_menu($ASSIGNMENT_TYPE, "type", $form->type, "");
helpbutton("assignmenttype", get_string("assignmenttype", "assignment"), "assignment"); helpbutton("assignmenttype", get_string("assignmenttype", "assignment"), "assignment");
@ -119,21 +118,14 @@
</table> </table>
<br /> <br />
<center> <center>
<input type="hidden" name=course value="<?php p($form->course) ?>"> <input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>"> <input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name=section value="<?php p($form->section) ?>"> <input type="hidden" name=section value="<?php p($form->section) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>"> <input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>"> <input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>"> <input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=mode value="<?php p($form->mode) ?>"> <input type="hidden" name=mode value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>"> <input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
</center> </center>
</form> </form>
<?php
if ($usehtmleditor) {
print_richedit_javascript("form", "description", "yes");
}
?>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004040100; $module->version = 2004040100;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;
?> ?>

View file

@ -40,10 +40,11 @@ function attendance_add_instance($attendance) {
$attendance->day = make_timestamp($attendance->theyear, $attendance->day = make_timestamp($attendance->theyear,
$attendance->themonth, $attendance->theday); $attendance->themonth, $attendance->theday);
} }
$attendance->notes = $attendance->name;
$attendance->name=userdate($attendance->day, get_string("strftimedate")); $attendance->name=userdate($attendance->day, get_string("strftimedate"));
if (isset($attendance->notes)) { if ($attendance->notes) {
$attendance->name = $attendance->name . " - " . $attendance->notes; $attendance->name = $attendance->name . " - " . $attendance->notes;
} }
$attendance->edited = 0; $attendance->edited = 0;
if ($attendance->dynsection) { if ($attendance->dynsection) {
if ($mod->course) { if ($mod->course) {
@ -78,10 +79,10 @@ function attendance_update_instance($attendance) {
$attendance->day = make_timestamp($attendance->theyear, $attendance->day = make_timestamp($attendance->theyear,
$attendance->themonth, $attendance->theday); $attendance->themonth, $attendance->theday);
$attendance->notes = $attendance->name;
$attendance->name=userdate($attendance->day, get_string("strftimedate")); $attendance->name=userdate($attendance->day, get_string("strftimedate"));
if ($attendance->notes) { if ($attendance->notes) {
$attendance->name = $attendance->name . " - " . $attendance->name = $attendance->name . " - " . $attendance->notes;
$attendance->notes;
} }
if ($attendance->dynsection) { if ($attendance->dynsection) {
//get info about the course //get info about the course

View file

@ -4,6 +4,7 @@
<!-- RJJ I'm using inline CSS styles for some stuff in this page because I want to centralize --> <!-- RJJ I'm using inline CSS styles for some stuff in this page because I want to centralize -->
<!-- the logic and styles in a single directory --> <!-- the logic and styles in a single directory -->
<?php @include_once("$CFG->dirroot/mod/attendance/lib.php"); <?php @include_once("$CFG->dirroot/mod/attendance/lib.php");
$nohtmleditorneeded = true;
//require_once("lib.php") //require_once("lib.php")
// error_reporting(E_ALL); // error_reporting(E_ALL);
@ -20,8 +21,6 @@ if (empty($form->id)) {
?> ?>
<FORM name="form" method="post" action="<?php echo $ME ?>"> <FORM name="form" method="post" action="<?php echo $ME ?>">
<CENTER> <CENTER>
<INPUT type="submit" value="<?php print_string("savechanges") ?>">
<INPUT type="submit" name="cancel" value="<?php print_string("cancel") ?>">
<TABLE cellpadding=5> <TABLE cellpadding=5>
<!-- <?php $options[0] = get_string("no"); $options[1] = get_string("yes"); ?> --> <!-- <?php $options[0] = get_string("no"); $options[1] = get_string("yes"); ?> -->
@ -30,9 +29,9 @@ if (empty($form->id)) {
<!-- <TD align=left><?php choose_from_menu($options, "roll", $form->roll, "") ?></td> --> <!-- <TD align=left><?php choose_from_menu($options, "roll", $form->roll, "") ?></td> -->
<!-- </tr> --> <!-- </tr> -->
<tr valign=top> <tr valign=top>
<td align=right><p><b><?php print_string("notes", "attendance") ?>:</b></p></td> <td align=right><p><b><?php print_string("name") ?>:</b></p></td>
<td colspan="3"> <td colspan="3">
<input type="text" name="notes" size=60 value="<?php p($form->notes)?>"> <input type="text" name="name" size=60 value="<?php p($form->notes)?>">
</td> </td>
</tr> </tr>

View file

@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004050301; // The current module version (Date: YYYYMMDDXX) $module->version = 2004050301; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 3600; // Period for cron to check this module (secs) $module->cron = 3600; // Period for cron to check this module (secs)
?> ?>

View file

@ -12,7 +12,7 @@
$form->studentlogs = 0; $form->studentlogs = 0;
} }
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
<tr> <tr>
<tr valign=top> <tr valign=top>
@ -35,7 +35,7 @@
</font> </font>
</td> </td>
<td> <td>
<textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea> <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>

View file

@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004043000; // The (date) version of this module $module->version = 2004043000; // The (date) version of this module
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 300; // How often should cron check this module (seconds)? $module->cron = 300; // How often should cron check this module (seconds)?
?> ?>

View file

@ -33,16 +33,8 @@
$form->showunanswered = 0; $form->showunanswered = 0;
} }
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
$onsubmit = "onsubmit=\"copyrichtext(document.form.text);\"";
} else {
$defaultformat = FORMAT_MOODLE;
$onsubmit = "";
}
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
@ -74,15 +66,19 @@
<?php <?php
print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text); print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text);
echo "<p align=right>"; if ($usehtmleditor) {
helpbutton("textformat", get_string("formattexttype")); echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
print_string("formattexttype"); } else {
echo ":&nbsp;"; echo "<p align=right>";
if (!$form->format) { helpbutton("textformat", get_string("formattexttype"));
$form->format = $defaultformat; print_string("formattexttype");
echo ":&nbsp;";
if (!$form->format) {
$form->format = $defaultformat;
}
choose_from_menu(format_text_menu(), "format", $form->format, "");
echo "</p>";
} }
choose_from_menu(format_text_menu(), "format", $form->format, "");
echo "</p>";
?> ?>
</td> </td>
</tr> </tr>
@ -167,9 +163,3 @@
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name=cancel value="<?php print_string("cancel") ?>">
</center> </center>
</form> </form>
<?php
if ($usehtmleditor) {
print_richedit_javascript("form", "text", "yes");
}
?>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004021700; $module->version = 2004021700;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; $module->cron = 0;
?> ?>

View file

@ -1,13 +1,4 @@
<?php <?php
// set the defaults...
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
$onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
} else {
$defaultformat = FORMAT_MOODLE;
$onsubmit = "";
}
// ...and fill the form if needed
if (!isset($form->name)) { if (!isset($form->name)) {
$form->name = ""; $form->name = "";
} }
@ -29,7 +20,7 @@
print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "dialogue"); print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "dialogue");
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
<tr valign=top> <tr valign=top>
<td align=right><p><b><?php print_string("dialoguename", "dialogue") ?>:</b></p></td> <td align=right><p><b><?php print_string("dialoguename", "dialogue") ?>:</b></p></td>
@ -50,7 +41,7 @@ print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "d
</TD> </TD>
<td> <td>
<textarea name="intro" rows=15 cols=30 wrap="virtual"><?php p($form->intro) ?></textarea> <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004013101; $module->version = 2004013101;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;
?> ?>

View file

@ -22,6 +22,8 @@
if (empty($form->deadline)) { if (empty($form->deadline)) {
$form->deadline = ""; $form->deadline = "";
} }
$nohtmleditorneeded = true;
?> ?>
<form name="form" method="post" action="mod.php"> <form name="form" method="post" action="mod.php">
@ -49,7 +51,7 @@
$grades[$i] = $i; $grades[$i] = $i;
} }
choose_from_menu($grades, "grade", "$form->grade", ""); choose_from_menu($grades, "grade", "$form->grade", "");
helpbutton("grade", get_string("maximumgrade", "exercise"), "exercise"); helpbutton("grade", get_string("maximumgrade", "exercise"), "exercise");
?> ?>
</td> </td>
</tr> </tr>
@ -83,7 +85,7 @@
$numbers[$i] = $i; $numbers[$i] = $i;
} }
choose_from_menu($numbers, "nelements", "$form->nelements", ""); choose_from_menu($numbers, "nelements", "$form->nelements", "");
helpbutton("nelements", get_string("numberofassessmentelements", "exercise"), "exercise"); helpbutton("nelements", get_string("numberofassessmentelements", "exercise"), "exercise");
?> ?>
</td> </td>
</tr> </tr>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004013101; $module->version = 2004013101;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;
?> ?>

View file

@ -30,7 +30,7 @@
$form->rssarticles = 0; $form->rssarticles = 0;
} }
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
<tr> <tr>
<tr valign=top> <tr valign=top>
@ -77,7 +77,7 @@
</font> </font>
</td> </td>
<td> <td>
<textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea> <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
</td> </td>
</tr> </tr>

View file

@ -481,7 +481,7 @@
print_simple_box_end(); print_simple_box_end();
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("message");
} }
print_footer($course); print_footer($course);

View file

@ -178,7 +178,7 @@
include("comment.html"); include("comment.html");
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("text");
} }
} }
} }

View file

@ -1,7 +1,5 @@
<?PHP // $Id$ <?PHP // $Id$
global $CFG;
if (!isset($form->studentcanpost)) { if (!isset($form->studentcanpost)) {
$form->studentcanpost = $CFG->glossary_studentspost; $form->studentcanpost = $CFG->glossary_studentspost;
} }
@ -74,7 +72,7 @@ if (!isset($form->showspecial)) {
</font> </font>
</td> </td>
<td> <td>
<textarea name="intro" rows=5 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea> <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
</td> </td>
</tr> </tr>
<TR valign=top> <TR valign=top>

View file

@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004051400; // The current module version (Date: YYYYMMDDXX) $module->version = 2004051400; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004050300; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)
$release = "0.5 development"; // User-friendly version number $release = "0.5 development"; // User-friendly version number

View file

@ -90,7 +90,7 @@
include("edit.html"); include("edit.html");
if ($usehtmleditor) { if ($usehtmleditor) {
use_html_editor(); use_html_editor("text");
} }
print_footer($course); print_footer($course);

View file

@ -1,10 +1,4 @@
<?php <?php
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
} else {
$defaultformat = FORMAT_MOODLE;
}
if (!isset($form->name)) { if (!isset($form->name)) {
$form->name = ""; $form->name = "";
} }
@ -23,7 +17,7 @@
} }
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
<tr valign=top> <tr valign=top>
<td align=right><p><b><?php print_string("journalname", "journal") ?>:</b></p></td> <td align=right><p><b><?php print_string("journalname", "journal") ?>:</b></p></td>
@ -53,15 +47,19 @@
<?php <?php
print_textarea($usehtmleditor, 20, 60, 680, 400, "intro", $form->intro); print_textarea($usehtmleditor, 20, 60, 680, 400, "intro", $form->intro);
echo "<p align=right>"; if ($usehtmleditor) {
helpbutton("textformat", get_string("formattexttype")); echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
print_string("formattexttype"); } else {
echo ":&nbsp;"; echo "<p align=right>";
if (!$form->introformat) { helpbutton("textformat", get_string("formattexttype"));
$form->introformat = $defaultformat; print_string("formattexttype");
echo ":&nbsp;";
if (!$form->introformat) {
$form->introformat = $defaultformat;
}
choose_from_menu(format_text_menu(), "introformat", $form->introformat, "");
echo "</p>";
} }
choose_from_menu(format_text_menu(), "introformat", $form->introformat, "");
echo "</p>";
?> ?>
</td> </td>
</tr> </tr>
@ -107,11 +105,3 @@
<input type="submit" name=cancel value="<?php print_string("cancel") ?>"> <input type="submit" name=cancel value="<?php print_string("cancel") ?>">
</form> </form>
</center> </center>
<?php
if ($usehtmleditor) {
print_richedit_javascript("form", "intro", "yes");
}
?>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004020500; $module->version = 2004020500;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;
?> ?>

View file

@ -1,14 +1,6 @@
<!-- This page defines the form to create or edit an instance of this module --> <!-- This page defines the form to create or edit an instance of this module -->
<!-- It is used from /course/mod.php. The whole instance is available as $form. --> <!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<?php
if ($usehtmleditor = can_use_html_editor()) {
$defaultformat = FORMAT_HTML;
} else {
$defaultformat = FORMAT_MOODLE;
}
?>
<form name="form" method="post" action="mod.php"> <form name="form" method="post" action="mod.php">
<center> <center>
<table cellpadding=5> <table cellpadding=5>
@ -46,9 +38,3 @@
<input type="submit" value="<?php print_string("savechanges") ?>"> <input type="submit" value="<?php print_string("savechanges") ?>">
</center> </center>
</form> </form>
<?php
if ($usehtmleditor) {
use_html_editor();
}
?>

View file

@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004021900; // The current module version (Date: YYYYMMDDXX) $module->version = 2004021900; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)
?> ?>

View file

@ -2,7 +2,8 @@
<!-- It is used from /course/mod.php. The whole instance is available as $form. --> <!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<?php <?php
require("$CFG->dirroot/mod/lesson/lib.php"); // for parameter array require_once("$CFG->dirroot/mod/lesson/lib.php"); // for parameter array
$nohtmleditorneeded = true;
// set the defaults // set the defaults
if (empty($form->name)) { if (empty($form->name)) {
@ -38,6 +39,7 @@ require("$CFG->dirroot/mod/lesson/lib.php"); // for parameter array
if (!isset($form->deadline)) { if (!isset($form->deadline)) {
$form->deadline = 0; $form->deadline = 0;
} }
?> ?>
<FORM name="form" method="post" action="<?php echo $ME ?>"> <FORM name="form" method="post" action="<?php echo $ME ?>">

View file

@ -6,7 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004032700; // The current module version (Date: YYYYMMDDXX) $module->version = 2004032700; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)
?> ?>

View file

@ -60,11 +60,25 @@
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>
<td align=right><p><b><?php print_string("introduction", "quiz") ?>:</b></p></td> <td align=right><p><b><?php print_string("introduction", "quiz") ?>:</b></p>
<br />
<font size="1">
<?php
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("text", get_string("helptext"), "moodle", true, true);
echo '<br />';
emoticonhelpbutton("form", "description");
echo '<br />';
}
?>
<br />
</font>
</td>
<td> <td>
<textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
<?php <?php
helpbutton("text", get_string("helptext")); print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro);
?> ?>
</td> </td>
</tr> </tr>

View file

@ -91,7 +91,7 @@ class quiz_report extends quiz_default_report {
$user_resps = qr_quiz_responses($thisquizid); $user_resps = qr_quiz_responses($thisquizid);
// //print_object($user_resps); // //print_object($user_resps);
foreach($user_resps as $thiskey => $thisresp){ foreach($user_resps as $thiskey => $thisresp){
$userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=$thisresp->answer; $userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=s($thisresp->answer);
$userdata[$thisresp->userid][$thisresp->attemptno]['grade']=$thisresp->sumgrades; $userdata[$thisresp->userid][$thisresp->attemptno]['grade']=$thisresp->sumgrades;
$userdata[$thisresp->userid][$thisresp->attemptno]['name']=fullname($thisresp); $userdata[$thisresp->userid][$thisresp->attemptno]['name']=fullname($thisresp);
$userdata[$thisresp->userid][$thisresp->attemptno]['attemptid']=$thisresp->aid; $userdata[$thisresp->userid][$thisresp->attemptno]['attemptid']=$thisresp->aid;

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004060200; // The (date) version of this module $module->version = 2004060200; // The (date) version of this module
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)? $module->cron = 0; // How often should cron check this module (seconds)?
?> ?>

View file

@ -451,7 +451,7 @@
</form> </form>
<?php <?php
if ($usehtmleditor and $form->type == HTML) { if ($usehtmleditor and $form->type == HTML) {
use_html_editor(); use_html_editor("alltext");
} }
print_simple_box_end(); print_simple_box_end();
print_footer($course); print_footer($course);

View file

@ -14,6 +14,7 @@
if (empty($form->alltext)) { if (empty($form->alltext)) {
$form->alltext = ""; $form->alltext = "";
} }
$nohtmleditorneeded = true;
?> ?>
@ -54,7 +55,7 @@
</font> </font>
</td> </td>
<td> <td>
<textarea name="summary" rows=5 cols=50 wrap="virtual"><?php p($form->summary) ?></textarea> <?php print_textarea(false, 7, 50, 680, 400, "summary", $form->summary); ?>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004013101; $module->version = 2004013101;
$module->requires = 2004051600; // Requires this Moodle version $module->requires = 2004052501; // Requires this Moodle version
$module->cron = 0; $module->cron = 0;
?> ?>

View file

@ -52,7 +52,7 @@
</font> </font>
</td> </td>
<td> <td>
<textarea name="summary" rows=5 cols=50 wrap="virtual"><?php p($form->summary) ?></textarea> <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "summary", $form->summary); ?>
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>

View file

@ -6,6 +6,7 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
$module->version = 2004040900; // The (date) version of this module $module->version = 2004040900; // The (date) version of this module
$module->requires = 2004051600; // The version of Moodle that is required
$module->cron = 0; // How often should cron check this module (seconds)? $module->cron = 0; // How often should cron check this module (seconds)?
?> ?>

View file

@ -8,6 +8,7 @@
if (!isset($form->intro)) { if (!isset($form->intro)) {
$form->intro = ""; $form->intro = "";
} }
$nohtmleditorneeded = true;
?> ?>
<form name="form" method="post" action="../mod/survey/details.php"> <form name="form" method="post" action="../mod/survey/details.php">

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004021900; $module->version = 2004021900;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004051600; // Requires this Moodle version
$module->cron = 0; $module->cron = 0;
?> ?>

View file

@ -1,12 +1,4 @@
<?php <?php
// set the defaults...
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
$onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
} else {
$defaultformat = FORMAT_MOODLE;
$onsubmit = "";
}
// ...and fill the form if needed // ...and fill the form if needed
if (empty($form->name)) { if (empty($form->name)) {
$form->name = ""; $form->name = "";
@ -49,7 +41,7 @@
} }
?> ?>
<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php"> <form name="form" method="post" action="mod.php">
<table cellpadding=5> <table cellpadding=5>
<tr valign=top> <tr valign=top>
<td align=right><P><B><?php print_string("title", "workshop") ?>:</B></P></TD> <td align=right><P><B><?php print_string("title", "workshop") ?>:</B></P></TD>
@ -58,25 +50,39 @@
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>
<td align=right><P><B><?php print_string("description", "workshop") ?>:</B></P></TD> <td align=right><p><b><?php print_string("description", "workshop") ?>:</b></p>
<font size="1">
<?php
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("text", get_string("helptext"), "moodle", true, true);
echo "<br />";
emoticonhelpbutton("form", "description", "moodle", true, true);
echo "<br />";
}
?>
<br />
</font>
<td> <td>
<?php <?php
print_textarea($usehtmleditor, 20, 60, 595, 400, "description", $form->description); print_textarea($usehtmleditor, 20, 60, 595, 400, "description", $form->description);
if ($usehtmleditor) { if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext")); echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else { } else {
helpbutton("text", get_string("helptext")); echo '<p align="right">';
helpbutton("textformat", get_string("formattexttype"));
print_string("formattexttype");
echo ':&nbsp;';
if (!$form->format) {
$form->format = $defaultformat;
}
choose_from_menu(format_text_menu(), "format", $form->format, "");
echo '</p>';
} }
echo "<P align=right>";
print_string("formattexttype");
echo ":&nbsp;";
if (!$form->format) {
$form->format = $defaultformat;
}
choose_from_menu(format_text_menu(), "format", $form->format, "");
helpbutton("textformat", get_string("formattexttype"));
echo "</P>";
?> ?>
</td> </td>
</tr> </tr>
@ -242,10 +248,3 @@
</CENTER> </CENTER>
</FORM> </FORM>
<?php
if ($usehtmleditor) {
print_richedit_javascript("form", "description", "no");
}
?>

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
$module->version = 2004052100; $module->version = 2004052100;
$module->requires = 2004013101; // Requires this Moodle version $module->requires = 2004051600; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;
?> ?>

View file

@ -1,4 +1,4 @@
<?PHP //$Id <?PHP //$Id$
//This file returns the required rss feeds //This file returns the required rss feeds
//The URL format MUST include: //The URL format MUST include:
// course: the course id // course: the course id

View file

@ -9,5 +9,4 @@ $version = 2004060100; // The current version is a date (YYYYMMDDXX)
$release = "1.4 development"; // User-friendly version number $release = "1.4 development"; // User-friendly version number
?> ?>