Standardise the intro box using an ID

This commit is contained in:
moodler 2005-03-13 16:17:55 +00:00
parent 6ee8277fc1
commit b846ac39ff
12 changed files with 17 additions and 20 deletions

View File

@ -64,7 +64,7 @@
notice(get_string("activityiscurrentlyhidden")); notice(get_string("activityiscurrentlyhidden"));
} }
print_simple_box_start("center"); print_simple_box_start('center', '70%', '', 5, 'generalbox', 'intro');
print_heading($assignment->name, "center"); print_heading($assignment->name, "center");
$timedifference = $assignment->timedue - time(); $timedifference = $assignment->timedue - time();

View File

@ -125,7 +125,7 @@
} }
if ($chat->intro) { if ($chat->intro) {
print_simple_box( format_text($chat->intro) , 'center'); print_simple_box(format_text($chat->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
echo '<br />'; echo '<br />';
} }

View File

@ -85,7 +85,9 @@
notice(get_string("activityiscurrentlyhidden")); notice(get_string("activityiscurrentlyhidden"));
} }
print_simple_box( format_text($choice->text, $choice->format) , "center"); if ($choice->text) {
print_simple_box(format_text($choice->text, $choice->format), 'center', '70%', '', 5, 'generalbox', 'intro');
}
// print the form // print the form

View File

@ -64,7 +64,7 @@
/************ view **************************************************/ /************ view **************************************************/
elseif ($action == 'view') { elseif ($action == 'view') {
print_simple_box( format_text($dialogue->intro) , "center"); print_simple_box(format_text($dialogue->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
echo "<br />"; echo "<br />";
// get some stats // get some stats
$countneedingrepliesself = dialogue_count_needing_replies_self($dialogue, $USER); $countneedingrepliesself = dialogue_count_needing_replies_self($dialogue, $USER);

View File

@ -200,7 +200,7 @@
case 'eachuser': case 'eachuser':
if (!empty($forum->intro)) { if (!empty($forum->intro)) {
print_simple_box(format_text($forum->intro), 'center'); print_simple_box(format_text($forum->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
} }
echo '<p align="center">'; echo '<p align="center">';
if (forum_user_can_post_discussion($forum)) { if (forum_user_can_post_discussion($forum)) {
@ -226,7 +226,7 @@
default: default:
if (!empty($forum->intro)) { if (!empty($forum->intro)) {
print_simple_box(format_text($forum->intro), 'center'); print_simple_box(format_text($forum->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
} }
echo '<br />'; echo '<br />';
if (!empty($showall)) { if (!empty($showall)) {

View File

@ -250,10 +250,7 @@
/// Info box /// Info box
if ( $glossary->intro ) { if ( $glossary->intro ) {
echo '<table align="center" width="70%" border="0">'; print_simple_box(format_text($glossary->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
echo '<tr><td align="center" class="glossaryintrobox">';
echo format_text($glossary->intro);
print_simple_box_end();
} }
/// Search box /// Search box

View File

@ -54,7 +54,7 @@
$journal->intro = trim($journal->intro); $journal->intro = trim($journal->intro);
if (!empty($journal->intro)) { if (!empty($journal->intro)) {
print_simple_box( format_text($journal->intro, $journal->introformat) , "center"); print_simple_box( format_text($journal->intro, $journal->introformat), 'center', '70%', '', 5, 'generalbox', 'intro');
} }
echo "<br />"; echo "<br />";

View File

@ -92,7 +92,7 @@
print_heading($quiz->name); print_heading($quiz->name);
if (trim(strip_tags($quiz->intro))) { if (trim(strip_tags($quiz->intro))) {
print_simple_box(format_text($quiz->intro), "center"); print_simple_box(format_text($quiz->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
} }

View File

@ -73,7 +73,7 @@
print_heading($scorm->name); print_heading($scorm->name);
print_simple_box(text_to_html($scorm->summary), "center"); print_simple_box(format_text($scorm->summary), 'center', '70%', '', 5, 'generalbox', 'intro');
if (isguest()) { if (isguest()) {
print_heading(get_string("guestsno", "scorm")); print_heading(get_string("guestsno", "scorm"));

View File

@ -72,7 +72,7 @@
} else { } else {
print_simple_box(format_text($survey->intro), "center", "80%"); print_simple_box(format_text($survey->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
print_spacer(30); print_spacer(30);
$questions = get_records_list("survey_questions", "id", $survey->questions); $questions = get_records_list("survey_questions", "id", $survey->questions);
@ -102,7 +102,7 @@
echo "<form name=\"form\" method=\"post\" action=\"save.php\">"; echo "<form name=\"form\" method=\"post\" action=\"save.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />"; echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
print_simple_box(format_text($survey->intro), "center", "80%"); print_simple_box(format_text($survey->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
// Get all the major questions and their proper order // Get all the major questions and their proper order
if (! $questions = get_records_list("survey_questions", "id", $survey->questions)) { if (! $questions = get_records_list("survey_questions", "id", $survey->questions)) {

View File

@ -303,9 +303,7 @@
if($ewiki_title==$wiki_entry->pagename && !empty($wiki->summary)) { if($ewiki_title==$wiki_entry->pagename && !empty($wiki->summary)) {
if (trim(strip_tags($wiki->summary))) { if (trim(strip_tags($wiki->summary))) {
print "<br />"; print_simple_box(format_text($wiki->summary, FORMAT_MOODLE), 'center', '70%', '', 5, 'generalbox', 'intro');
print_simple_box(format_text($wiki->summary, FORMAT_MOODLE), "center");
print "<br />";
} }
} }

View File

@ -178,7 +178,7 @@
// if the student has not yet submitted show the full description // if the student has not yet submitted show the full description
if (!record_exists('workshop_submissions', 'workshopid', $workshop->id, 'userid', $USER->id)) { if (!record_exists('workshop_submissions', 'workshopid', $workshop->id, 'userid', $USER->id)) {
print_simple_box(format_text($workshop->description, $workshop->format), 'center'); print_simple_box(format_text($workshop->description, $workshop->format), 'center', '70%', '', 5, 'generalbox', 'intro');
} else { } else {
print_heading("<b><a href=\"view.php?id=$cm->id&amp;action=showdescription\">". print_heading("<b><a href=\"view.php?id=$cm->id&amp;action=showdescription\">".
get_string("showdescription", 'workshop')."</a></b>"); get_string("showdescription", 'workshop')."</a></b>");
@ -540,7 +540,7 @@
elseif ($action == 'showdescription') { elseif ($action == 'showdescription') {
workshop_print_assignment_info($workshop); workshop_print_assignment_info($workshop);
print_simple_box(format_text($workshop->description, $workshop->format), 'center'); print_simple_box(format_text($workshop->description, $workshop->format), 'center', '70%', '', 5, 'generalbox', 'intro');
print_continue($_SERVER["HTTP_REFERER"]); print_continue($_SERVER["HTTP_REFERER"]);
} }