Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MySQL 5.7] - Basic compliance #2222

Merged
merged 2 commits into from
Sep 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1089,12 +1089,12 @@ CREATE TABLE `tarchive` (
`DicomArchiveID` varchar(255) NOT NULL default '',
`PatientID` varchar(255) NOT NULL default '',
`PatientName` varchar(255) NOT NULL default '',
`PatientDoB` date NOT NULL default '0000-00-00',
`PatientDoB` date default NULL,
`PatientGender` varchar(255) default NULL,
`neurodbCenterName` varchar(255) default NULL,
`CenterName` varchar(255) NOT NULL default '',
`LastUpdate` datetime NOT NULL default '0000-00-00 00:00:00',
`DateAcquired` date NOT NULL default '0000-00-00',
`LastUpdate` datetime default NULL,
`DateAcquired` date default NULL,
`DateFirstArchived` datetime default NULL,
`DateLastArchived` datetime default NULL,
`AcquisitionCount` int(11) NOT NULL default '0',
Expand Down Expand Up @@ -1314,7 +1314,7 @@ CREATE TABLE `users` (
`Active` enum('Y','N') NOT NULL default 'Y',
`Password_md5` varchar(34) default NULL,
`Password_hash` varchar(255) default NULL,
`Password_expiry` date NOT NULL default '0000-00-00',
`Password_expiry` date NOT NULL default '1990-04-01',
`Pending_approval` enum('Y','N') default 'Y',
`Doc_Repo_Notifications` enum('Y','N') default 'N',
PRIMARY KEY (`ID`),
Expand Down
1 change: 0 additions & 1 deletion modules/conflict_resolver/test/conflict_resolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function setUp()
'OldValue1' => 'Mother',
'OldValue2' => 'Father',
'NewValue' => 'NULL',
'ConflictID' => 'NULL',
)
);
$this->DB->insert(
Expand Down
4 changes: 3 additions & 1 deletion modules/dashboard/test/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test',
)
);
Expand Down Expand Up @@ -111,6 +111,7 @@ function setUp()
"violations_resolved",
array(
'ExtID' => '1001',
'hash' => 'this is not a null value',
'TypeTable' => 'mri_protocol_violated_scans',
'Resolved' => 'other',
)
Expand All @@ -119,6 +120,7 @@ function setUp()
"violations_resolved",
array(
'ExtID' => '1002',
'hash' => 'this is not a null value',
'TypeTable' => 'MRICandidateErrors',
'Resolved' => 'unresolved',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class NDB_Form_data_team_helper extends NDB_Form
}

else{
$query = "SELECT COUNT(*), s.ID, s.visit_label, c.PSCID,s.candid, f.SessionID, f.test_name,f.data_entry,f.commentid, t.Full_name FROM session s
$query = "SELECT COUNT(*) FROM session s
JOIN flag f ON (f.sessionid = s.id)
JOIN candidate c ON (c.candid = s.candid)
JOIN test_names t ON (t.Test_name = f.Test_name)
Expand Down Expand Up @@ -459,7 +459,7 @@ class NDB_Form_data_team_helper extends NDB_Form
JOIN psc ON (s.CenterID = psc.CenterID) ";
}
else{
$query = "SELECT COUNT(*), s.ID, s.visit_label, c.PSCID,s.candid, f.SessionID, f.test_name,f.data_entry,f.commentid, t.Full_name FROM session s
$query = "SELECT COUNT(*) FROM session s
JOIN flag f ON (f.sessionid = s.id)
JOIN candidate c ON (c.candid = s.candid)
JOIN test_names t ON (t.Test_name = f.Test_name)
Expand Down
1 change: 1 addition & 0 deletions modules/dicom_archive/test/dicom_archiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function setUp()
'SessionID' => '44',
'uploadAttempt' => '0',
'CreateInfo' => 'NULL',
'AcquisitionMetadata' => 'A really long text that can not be null.',
)
);
}
Expand Down
30 changes: 14 additions & 16 deletions modules/document_repository/test/document_repositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class documentRepositoryTestIntegrationTest extends LorisIntegrationTest
public function setUp()
{
parent::setUp();
$window = new WebDriverWindow($this->webDriver);
$size = new WebDriverDimension(1024,1768);
$window->setSize($size);
$window = new WebDriverWindow($this->webDriver);
$size = new WebDriverDimension(1024,1768);
$window->setSize($size);
$this->DB->insert(
"document_repository_categories",
array(
Expand All @@ -50,7 +50,6 @@ public function setUp()
'uploaded_by' => 'admin',
'For_site' => '3',
'comments' => 'tester',
'multipart' => 'NULL',
'EARLI' => '0',
'hide_video' => '0',
'File_category' => '9999999',
Expand Down Expand Up @@ -126,8 +125,7 @@ function testDocumentRepositoryCreateCategory()
$this->safeGet($this->url . "/document_repository/");
$this->safeFindElement(
WebDriverBy::Name("addCategory"),
3000
)->click();
3000)->click();
sleep(10);
$this->safeFindElement(
WebDriverBy::Name(
Expand All @@ -154,9 +152,9 @@ function testDocumentRepositoryCreateCategory()
$this->safeFindElement(WebDriverBy::Id("postCategory"))->click();
sleep(10);
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TestTestTesta']/td/span"),3000
)
->click();
WebDriverBy::Xpath("//*[@id='TestTestTesta']/td/span"),
3000
)->click();
$test = $this->safeFindElement(WebDriverBy::Id("testa"))
->getText();
$this->assertContains("test", $test);
Expand All @@ -173,11 +171,12 @@ function testDocumentRepositoryUploadFile()
$this->markTestSkipped("This method isn't working properly on travis.");
$this->safeGet($this->url . "/document_repository/");
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span"),3000
)
->click();
$test = $this->safeFindElement(WebDriverBy::linkText("README.md"))
->getText();
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span"),
3000
)->click();
$test = $this->safeFindElement(
WebDriverBy::linkText("README.md")
)->getText();
$this->assertContains("README.md", $test);

}
Expand All @@ -191,8 +190,7 @@ function testDocumentRepositoryUploadFileEditDeleteComment()
$this->safeGet($this->url . "/document_repository/");
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span")
)
->click();
)->click();
$this->safeFindElement(
WebDriverBy::Id("9999999")
)->click();
Expand Down
4 changes: 2 additions & 2 deletions modules/examiner/test/ExaminerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public function setUp()
$this->DB->insert(
"psc",
array(
'CenterID' => '9999999',
'CenterID' => '99',
'Name' => 'TEST_Site',
'Study_site' => 'Y',
'StateID' => '0',
'Alias' => 'DDD',
'MRI_alias' => 'TESTTEST',
'MRI_alias' => 'TEST',
)
);
}
Expand Down
1 change: 0 additions & 1 deletion modules/help_editor/test/help_editorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function setUp()
'topic' => 'Test Topic',
'content' => 'This is a test content.',
'created' => '2013-04-05 00:00:00',
'updated' => 'NULL',
)
);
}
Expand Down
6 changes: 3 additions & 3 deletions modules/imaging_browser/test/imaging_browserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function setUp()
'QCStatus' => null,
'QCFirstChangeTime' => 1455040145,
'QCLastChangeTime' => 1455040145,
'Selected' => 't2'
'Selected' => true
)
);

Expand All @@ -258,7 +258,7 @@ public function setUp()
'QCStatus' => null,
'QCFirstChangeTime' => 1455040145,
'QCLastChangeTime' => 1455040145,
'Selected' => 't1'
'Selected' => true
)
);

Expand Down Expand Up @@ -1285,4 +1285,4 @@ function testImageCommentsWindowEditable()
$this->webDriver->switchTo()->window($diff[1])->close();
}
}
?>
?>
4 changes: 3 additions & 1 deletion modules/mri_violations/test/mri_violationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)

Expand Down Expand Up @@ -84,6 +84,7 @@ public function setUp()
"violations_resolved",
array(
'ExtID' => '1001',
'hash' => 'not null value',
'TypeTable' => 'mri_protocol_violated_scans',
'Resolved' => 'other'
)
Expand All @@ -92,6 +93,7 @@ public function setUp()
"violations_resolved",
array(
'ExtID' => '1002',
'hash' => 'not null value',
'TypeTable' => 'MRICandidateErrors',
'Resolved' => 'unresolved'
)
Expand Down
16 changes: 8 additions & 8 deletions modules/new_profile/test/new_profileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ function testNewProfileDoBDateError() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/02/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-02-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
$gender = $this->webDriver->findElement(WebDriverBy::Name("gender"));
Expand Down Expand Up @@ -204,8 +204,8 @@ function testNewProfileCreateCandidate() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->safeFindElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand Down Expand Up @@ -235,8 +235,8 @@ function testNewProfilePSCIDSequential() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand All @@ -254,8 +254,8 @@ function testNewProfilePSCIDSequential() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand Down
2 changes: 1 addition & 1 deletion modules/reliability/test/reliabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)

Expand Down
2 changes: 1 addition & 1 deletion modules/statistics/php/NDB_Form_statistics.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class NDB_Form_statistics extends NDB_Form
AND c.Active='Y'
$suproject_query
$Param_Project
GROUP BY s.CenterID, VLabel, f.Data_Entry ORDER BY c.PSCID;",
GROUP BY s.CenterID, VLabel, f.Data_Entry",
$this->params
);
foreach($result as $row) {
Expand Down
2 changes: 1 addition & 1 deletion modules/survey_accounts/test/survey_accountsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)
);
Expand Down
Loading