From a02e387db0abc07aab327d2f9077b22bed862909 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Sat, 17 Jul 2010 04:51:12 +0300 Subject: [PATCH] Fixing more incorrect br-tags. --- main/gradebook/docs/example_csv.html | 34 +++---- main/gradebook/docs/example_xml.html | 10 +-- .../fckEmbedMovies/fck_embedmovies.html | 2 +- main/inc/lib/phpmailer/test/phpmailerTest.php | 88 +++++++++---------- main/wiki/wiki.inc.php | 8 +- 5 files changed, 71 insertions(+), 71 deletions(-) mode change 100644 => 100755 main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html mode change 100644 => 100755 main/inc/lib/phpmailer/test/phpmailerTest.php diff --git a/main/gradebook/docs/example_csv.html b/main/gradebook/docs/example_csv.html index 4ec3af89ed..49f4659873 100755 --- a/main/gradebook/docs/example_csv.html +++ b/main/gradebook/docs/example_csv.html @@ -4,33 +4,33 @@

CSV example for certificate importation

-This is an example file and this data can't be imported on your platform. The user id must correspond to users existing on your platform.
+This is an example file and this data can't be imported on your platform. The user id must correspond to users existing on your platform.
-The mandatory fields are emphasized. The other fields can be omitted. The separator is always the ";". If you want to overwrite the scores, you must choose the "Overwrite score" option.
+The mandatory fields are emphasized. The other fields can be omitted. The separator is always the ";". If you want to overwrite the scores, you must choose the "Overwrite score" option.

Complete CSV score importation file

-username;official_code;lastname;firstname;score;date
-bgate;bgate;Gate;Bill;2;02/25/09 12:24 PM
-ltorvald;ltorvald;Torvald;Linus;10;02/25/09 12:24 PM
-jsmith;;Smith;John;3;
-

+username;official_code;lastname;firstname;score;date
+bgate;bgate;Gate;Bill;2;02/25/09 12:24 PM
+ltorvald;ltorvald;Torvald;Linus;10;02/25/09 12:24 PM
+jsmith;;Smith;John;3;
+

Minimal CSV score importation file

This is possible to use a minimal file if you choose the "Ingnore error option" : -

-username;score
-bgate;2
-ltorvald;10
-jsmith;3
+

+username;score
+bgate;2
+ltorvald;10
+jsmith;3

Presence score importation file

For the presence this is the same file except the score fied which is "0" for absent and "1" for present : -

-username;official_code;lastname;firstname;score;date
-bgate;bgate;Gate;Bill;0;02/25/09 12:24 PM
-ltorvald;ltorvald;Torvald;Linus;1;02/25/09 12:24 PM
-jsmith;;Smith;John;0;
+

+username;official_code;lastname;firstname;score;date
+bgate;bgate;Gate;Bill;0;02/25/09 12:24 PM
+ltorvald;ltorvald;Torvald;Linus;1;02/25/09 12:24 PM
+jsmith;;Smith;John;0;
diff --git a/main/gradebook/docs/example_xml.html b/main/gradebook/docs/example_xml.html index ab64678cc0..073c2d390d 100755 --- a/main/gradebook/docs/example_xml.html +++ b/main/gradebook/docs/example_xml.html @@ -18,9 +18,9 @@

XML example for certificate importation

-This is an example file and this data can't be imported on your platform. The user id must correspond to users existing on your platform.
+This is an example file and this data can't be imported on your platform. The user id must correspond to users existing on your platform.
-The date and offical_code fiels aren't mandatory and can be omitted without any error. If you want to overwrite the scores, you must choose the "Overwrite score" option.
+The date and offical_code fiels aren't mandatory and can be omitted without any error. If you want to overwrite the scores, you must choose the "Overwrite score" option.

Complete XML score importation file

<?xml version="1.0" encoding="ISO-8859-1"?>

@@ -53,7 +53,7 @@ The date and offical_code fiels aren't mandatory and can be omitted without any

Minimal XML score importation file

This is possible to use a minimal file if you choose the "Ingnore error option" : -

+

<?xml version="1.0" encoding="ISO-8859-1"?>

<XMLResults>

<Result>

@@ -72,7 +72,7 @@ This is possible to use a minimal file if you choose the "Ingnore error option"

Complete XML presence importation file

For the presence this is the same file except the score fied which is "0" for absent and "1" for present : -

+

<?xml version="1.0" encoding="ISO-8859-1"?>

<XMLResults>

<Result>

@@ -101,7 +101,7 @@ For the presence this is the same file except the score fied which is "0" for ab

</Result>

</XMLResults>

-

+

You could also use a minimal XML file for the presence. diff --git a/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html b/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html old mode 100644 new mode 100755 index 2fecf9f343..358e8055b0 --- a/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html +++ b/main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.html @@ -44,7 +44,7 @@ document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; -
+
diff --git a/main/inc/lib/phpmailer/test/phpmailerTest.php b/main/inc/lib/phpmailer/test/phpmailerTest.php old mode 100644 new mode 100755 index 9fb8e44f7b..e46805a3e1 --- a/main/inc/lib/phpmailer/test/phpmailerTest.php +++ b/main/inc/lib/phpmailer/test/phpmailerTest.php @@ -38,20 +38,20 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { * @type string */ var $Host = ""; - + /** * Holds the change log. * @private * @type string array */ var $ChangeLog = array(); - + /** * Holds the note log. * @private * @type string array */ - var $NoteLog = array(); + var $NoteLog = array(); /** * Run before each test is started. @@ -97,14 +97,14 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->Mailer = "mail"; $this->Sender = "unit_test@phpmailer.sf.net"; } - + if (array_key_exists('mail_to', $_REQUEST)) { $this->SetAddress($_REQUEST['mail_to'], 'Test User', 'to'); } if (array_key_exists('mail_cc', $_REQUEST) and strlen($_REQUEST['mail_cc']) > 0) { $this->SetAddress($_REQUEST['mail_cc'], 'Carbon User', 'cc'); } - } + } /** * Run after each test is completed. @@ -124,8 +124,8 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { */ function BuildBody() { $this->CheckChanges(); - - // Determine line endings for message + + // Determine line endings for message if($this->Mail->ContentType == "text/html" || strlen($this->Mail->AltBody) > 0) { $eol = "
"; @@ -140,18 +140,18 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $bullet_start = ""; $bullet_end = ""; } - + $ReportBody = ""; - + $ReportBody .= "---------------------" . $eol; $ReportBody .= "Unit Test Information" . $eol; $ReportBody .= "---------------------" . $eol; $ReportBody .= "phpmailer version: " . PHPMailer::VERSION . $eol; $ReportBody .= "Content Type: " . $this->Mail->ContentType . $eol; - + if(strlen($this->Mail->Host) > 0) $ReportBody .= "Host: " . $this->Mail->Host . $eol; - + // If attachments then create an attachment list $attachments = $this->Mail->GetAttachments(); if(count($attachments) > 0) @@ -165,7 +165,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { } $ReportBody .= $bullet_end . $eol; } - + // If there are changes then list them if(count($this->ChangeLog) > 0) { @@ -175,12 +175,12 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $ReportBody .= $bullet_start; for($i = 0; $i < count($this->ChangeLog); $i++) { - $ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" . + $ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" . $this->ChangeLog[$i][1] . "]" . $eol; } $ReportBody .= $bullet_end . $eol . $eol; } - + // If there are notes then list them if(count($this->NoteLog) > 0) { @@ -194,11 +194,11 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { } $ReportBody .= $bullet_end; } - + // Re-attach the original body $this->Mail->Body .= $eol . $eol . $ReportBody; } - + /** * Check which default settings have been changed for the report. * @private @@ -224,7 +224,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { if($this->Mail->SMTPAuth) $this->AddChange("SMTPAuth", "true"); } - + /** * Adds a change entry. * @private @@ -235,7 +235,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->ChangeLog[$cur][0] = $sName; $this->ChangeLog[$cur][1] = $sNewValue; } - + /** * Adds a simple note to the message. * @public @@ -289,7 +289,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { * Try a plain message. */ function test_Low_Priority() { - + $this->Mail->Priority = 5; $this->Mail->Body = "Here is the main body. There should be " . "a reply to address in this message."; @@ -331,11 +331,11 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->Body = "Here is the text body"; $this->Mail->Subject .= ": Plain + StringAttachment"; - + $sAttachment = "These characters are the content of the " . "string attachment.\nThis might be taken from a ". "database or some other such thing. "; - + $this->Mail->AddStringAttachment($sAttachment, "string_attach.txt"); $this->BuildBody(); @@ -365,11 +365,11 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { * Try a plain message. */ function test_Html() { - + $this->Mail->IsHTML(true); $this->Mail->Subject .= ": HTML only"; - - $this->Mail->Body = "This is a test message written in HTML.
" . + + $this->Mail->Body = "This is a test message written in HTML.
" . "Go to " . "http://phpmailer.sourceforge.net/ for new versions of " . "phpmailer.

Thank you!"; @@ -386,7 +386,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->Body = "This is the HTML part of the email."; $this->Mail->Subject .= ": HTML + Attachment"; $this->Mail->IsHTML(true); - + if(!$this->Mail->AddAttachment(__FILE__, "test_attach.txt")) { $this->assertTrue(false, $this->Mail->ErrorInfo); @@ -406,7 +406,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { "Here is an image!"; $this->Mail->Subject .= ": Embedded Image"; $this->Mail->IsHTML(true); - + if(!$this->Mail->AddEmbeddedImage("test.png", "my-attach", "test.png", "base64", "image/png")) { @@ -431,7 +431,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { "Here is an image!"; $this->Mail->Subject .= ": Embedded Image + Attachment"; $this->Mail->IsHTML(true); - + if(!$this->Mail->AddEmbeddedImage("test.png", "my-attach", "test.png", "base64", "image/png")) { @@ -444,7 +444,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->assertTrue(false, $this->Mail->ErrorInfo); return; } - + $this->BuildBody(); $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); } @@ -475,7 +475,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->AltBody = "This is the text part of the email."; $this->Mail->Subject .= ": AltBody + Attachment"; $this->Mail->IsHTML(true); - + if(!$this->Mail->AddAttachment(__FILE__, "test_attach.txt")) { $this->assertTrue(false, $this->Mail->ErrorInfo); @@ -489,7 +489,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { } else { $this->assertTrue(false, 'Could not write local file - check permissions'); } - } + } function test_MultipleSend() { $this->Mail->Body = "Sending two messages without keepalive"; @@ -498,7 +498,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->Subject = $subject . ": SMTP 1"; $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); - + $this->Mail->Subject = $subject . ": SMTP 2"; $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); } @@ -531,26 +531,26 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->SMTPKeepAlive = true; $this->Mail->Subject = $subject . ": SMTP keep-alive 1"; $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); - + $this->Mail->Subject = $subject . ": SMTP keep-alive 2"; $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); $this->Mail->SmtpClose(); } - + /** - * Tests this denial of service attack: + * Tests this denial of service attack: * http://www.cybsec.com/vuln/PHPMailer-DOS.pdf */ function test_DenialOfServiceAttack() { $this->Mail->Body = "This should no longer cause a denial of service."; $this->BuildBody(); - + $this->Mail->Subject = str_repeat("A", 998); $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); } - + function test_Error() { - $this->Mail->Subject .= ": This should be sent"; + $this->Mail->Subject .= ": This should be sent"; $this->BuildBody(); $this->Mail->ClearAllRecipients(); // no addresses should cause an error $this->assertTrue($this->Mail->IsError() == false, "Error found"); @@ -560,7 +560,7 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->Mail->AddAddress($_REQUEST['mail_to']); $this->assertTrue($this->Mail->Send(), "Send failed"); } - + function test_Addressing() { $this->assertFalse($this->Mail->AddAddress('a@example..com'), 'Invalid address accepted'); $this->assertTrue($this->Mail->AddAddress('a@example.com'), 'Addressing failed'); @@ -607,11 +607,11 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { */ function test_Encodings() { $this->Mail->Charset = 'iso-8859-1'; - $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('¡Hola! Señor!', 'text'), 'Q Encoding (text) failed'); - $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('¡Hola! Señor!', 'comment'), 'Q Encoding (comment) failed'); - $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('¡Hola! Señor!', 'phrase'), 'Q Encoding (phrase) failed'); + $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('�Hola! Se�or!', 'text'), 'Q Encoding (text) failed'); + $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('�Hola! Se�or!', 'comment'), 'Q Encoding (comment) failed'); + $this->assertEquals('=A1Hola!_Se=F1or!', $this->Mail->EncodeQ('�Hola! Se�or!', 'phrase'), 'Q Encoding (phrase) failed'); } - + /** * Signing tests */ @@ -639,8 +639,8 @@ class phpmailerTest extends PHPUnit_Framework_TestCase { $this->assertTrue($this->Mail->set('Timeout', 11), 'Valid property set failed'); $this->Mail->getFile(__FILE__); } -} - +} + /** * This is a sample form for setting appropriate test values through a browser * These values can also be set using a file called testbootstrap.php (not in svn) in the same folder as this script diff --git a/main/wiki/wiki.inc.php b/main/wiki/wiki.inc.php index b48593241a..8ac3f808a2 100755 --- a/main/wiki/wiki.inc.php +++ b/main/wiki/wiki.inc.php @@ -275,7 +275,7 @@ function save_wiki() { $_clean['progress'] = Database::escape_string($_POST['progress']); $_clean['version'] = intval($_POST['version']) + 1 ; $_clean['linksto'] = links_to($_clean['content']); //and check links content - + $dtime = date( "Y-m-d H:i:s" ); $session_id = api_get_session_id(); @@ -1832,9 +1832,9 @@ function auto_add_page_users($assignment_type) $link2teacher=$_POST['title']= $title_orig."_uass".api_get_user_id(); //first: teacher name, photo, and assignment description (original content) - // $content_orig_A='

'.$photo.'
'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'
('.get_lang('Teacher').')

'; + // $content_orig_A='
'.$photo.'
'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'
('.get_lang('Teacher').')

'; - $content_orig_A='
'.get_lang('AssignmentDesc').'
'.$photo.'
'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'
'; + $content_orig_A='
'.get_lang('AssignmentDesc').'
'.$photo.'
'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'
'; $content_orig_B='
'.get_lang('AssignmentDescription').': '.$title_orig.'

'.$_POST['content']; @@ -1877,7 +1877,7 @@ function auto_add_page_users($assignment_type) { $_POST['title']= $title_orig; $_POST['comment']=get_lang('AssignmentFirstComToStudent'); - $_POST['content']='
'.get_lang('AssignmentWork').'
'.$photo.'
'.$name.'
[['.$link2teacher.' | '.get_lang('AssignmentLinktoTeacherPage').']] '; //If $content_orig_B is added here, the task written by the professor was copied to the page of each student. TODO: config options + $_POST['content']='
'.get_lang('AssignmentWork').'
'.$photo.'
'.$name.'
[['.$link2teacher.' | '.get_lang('AssignmentLinktoTeacherPage').']] '; //If $content_orig_B is added here, the task written by the professor was copied to the page of each student. TODO: config options //AssignmentLinktoTeacherPage $all_students_pages[] = '
  • '.strtoupper($o_user_to_add['lastname']).', '.$o_user_to_add['firstname'].' [['.$_POST['title']."_uass".$assig_user_id.' | '.$photo.']] '.$status_in_group.'
  • '; //don't change this line without guaranteeing that users will be ordered by last names in the following format (surname, name)