-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
108 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
INSERT INTO `email_templates` (`name`, `description`, `subject`, `content`, `availability`, `creator_id`, `created`, `updater_id`, `updated`) VALUES | ||
('Evaluation Reminder Template', 'evaluation reminder template', 'iPeer Evaluation Reminder', 'Hello {{{FIRSTNAME}}},\n\nA evaluation for {{{COURSENAME}}} is made available to you in iPeer, which has yet to be completed.\n\nName: {{{EVENTTITLE}}}\nDue Date: {{{DUEDATE}}}\nClose Date: {{{CLOSEDATE}}}\n\nThank You', 1, 1, NOW(), NULL, NULL); | ||
|
||
UPDATE `email_schedules` SET `content` = (SELECT id FROM `email_templates` WHERE `subject`="iPeer Evaluation Reminder" AND `content`="Hello {{{FIRSTNAME}}},\n\nA evaluation for {{{COURSENAME}}} is made available to you in iPeer, which has yet to be completed.\n\nName: {{{EVENTTITLE}}}\nDue Date: {{{DUEDATE}}}\nClose Date: {{{CLOSEDATE}}}\n\nThank You") WHERE `subject` like '%iPeer Evaluation Reminder%' and `sent`=0; | ||
|
||
UPDATE `sys_parameters` SET `parameter_value` = '8' WHERE `parameter_code` = 'database.version'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
require_once('upgrade_base.php'); | ||
/** | ||
* Upgrade315 | ||
* | ||
* @uses UpgradeBase | ||
* @package CTLT.iPeer | ||
* @author Michael Tang <[email protected]> | ||
* @copyright 2012 All rights reserved. | ||
* @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt} | ||
* @version Release: 3.1 | ||
*/ | ||
class Upgrade315 extends UpgradeBase | ||
{ | ||
/** | ||
* __construct | ||
* | ||
* @access public | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->fromVersions = array(null, '3.1.4'); | ||
$this->toVersion = '3.1.5'; | ||
$this->dbVersion = Configure::read('DATABASE_VERSION'); | ||
} | ||
|
||
/** | ||
* | ||
* @access public | ||
* @return void | ||
*/ | ||
public function isUpgradable() | ||
{ | ||
return parent::isUpgradable(); | ||
} | ||
|
||
/** | ||
* up | ||
* | ||
* @access public | ||
* @return boolean | ||
*/ | ||
public function up() | ||
{ | ||
$sysparameter = ClassRegistry::init('SysParameter'); | ||
$dbv = $sysparameter->get('database.version'); | ||
|
||
$ret = $this->patchDb($dbv, $this->dbVersion); | ||
if ($ret) { | ||
$this->errors[] = sprintf(__('Database patching failed: %s', true), $ret); | ||
return false; | ||
} | ||
$sysparameter->reload(); | ||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.4 | ||
3.1.5 |