From fef11384acddd302961562ca491e4547b1f9dac7 Mon Sep 17 00:00:00 2001 From: Compass Date: Wed, 2 Apr 2014 13:39:52 -0700 Subject: [PATCH 1/3] Improved the language on Student Result Mode help text --- app/views/events/add.ctp | 6 +++--- app/views/events/edit.ctp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/events/add.ctp b/app/views/events/add.ctp index c2659a2a8..a5df2af35 100644 --- a/app/views/events/add.ctp +++ b/app/views/events/add.ctp @@ -53,7 +53,7 @@ echo $this->Form->input( 'default' => '1' ) ); ?> -
+
Form->input('due_date', array('type' => 'text')); echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text')); @@ -62,7 +62,7 @@ echo $this->Form->input('result_release_date_begin', array('div' => array('id' => 'ResultReleaseBeginDiv'), 'label' => 'Results Released From', 'type' => 'text')); echo $this->Form->input('result_release_date_end', array('div' => array('id' => 'ResultReleaseEndDiv'), 'label' => 'Until', 'type' => 'text')); - + echo $this->Form->input( 'email_schedule', array( @@ -70,7 +70,7 @@ echo $this->Form->input( 'options' => $emailSchedules, 'div' => array('id' => 'emailSchedule') ) -); +); ?>
diff --git a/app/views/events/edit.ctp b/app/views/events/edit.ctp index 202639e69..15668d150 100644 --- a/app/views/events/edit.ctp +++ b/app/views/events/edit.ctp @@ -84,7 +84,7 @@ echo $this->Form->input( 'default' => '1' ) ); ?> -
+
Form->input('due_date', array('type' => 'text')); echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text')); @@ -102,7 +102,7 @@ echo $this->Form->input( 'default' => "$email_schedule", 'div' => array('id' => 'emailSchedule') ) -); +); ?>
From a4ba3bd021a55b4158fde3a81afce117615d684e Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Tue, 19 Aug 2014 11:44:12 -0700 Subject: [PATCH 2/3] Fix bug upgrading from 2.x and add utf8 for mysql connection for upgrade --- app/controllers/upgrade_controller.php | 2 +- app/libs/upgrade_scripts/upgrade_300.php | 12 ++++++------ app/libs/upgrade_scripts/upgrade_base.php | 11 +++++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/controllers/upgrade_controller.php b/app/controllers/upgrade_controller.php index 5bb384bd9..0ce2719cc 100644 --- a/app/controllers/upgrade_controller.php +++ b/app/controllers/upgrade_controller.php @@ -63,7 +63,7 @@ function index() $dbv = $this->SysParameter->get('database.version'); // workaround for a mistake in a sql templates in v3.0.x where // we forgot to add the system.version entry into sys_parameters - if (empty($sysv) && $dbv == 4) { + if (empty($sysv) && $dbv == 4 && $this->SysParameter->get('display.vocabulary.department')) { // upgrading from iPeer v3.0 $sysv = '3.0.x'; $dbv = 5; diff --git a/app/libs/upgrade_scripts/upgrade_300.php b/app/libs/upgrade_scripts/upgrade_300.php index 2d75ab43c..30621ddac 100644 --- a/app/libs/upgrade_scripts/upgrade_300.php +++ b/app/libs/upgrade_scripts/upgrade_300.php @@ -36,12 +36,12 @@ public function isUpgradable() $dbv = $sysparameter->get('database.version'); $sysv = $sysparameter->get('system.version'); - // If system.version doesn't exist, but we get a database version of 4, - // then that means we're upgrading from a prior iPeer v3 installation + // If system.version doesn't exist, but we get a database version of 4, + // then that means we're upgrading from a prior iPeer v3 installation // and don't need to run this upgrader. - if (empty($sysv) && $dbv == 4) { - return false; - } +# if (empty($sysv) && $dbv == 4) { +# return false; +# } return parent::isUpgradable(); } @@ -69,7 +69,7 @@ public function up() // when upgrading from v2, will run through all the delta_*.sql files // up to $this->dbVersion because the database version wasn't stored in // the database, so PHP get a null value back, which is then treated - // as if we're starting from version 0 + // as if we're starting from version 0 $sysparameter = ClassRegistry::init('SysParameter'); $dbv = $sysparameter->getDatabaseVersion(); $ret = $this->patchDb($dbv, $this->dbVersion); diff --git a/app/libs/upgrade_scripts/upgrade_base.php b/app/libs/upgrade_scripts/upgrade_base.php index ac5b2cff1..1e6c70c7b 100644 --- a/app/libs/upgrade_scripts/upgrade_base.php +++ b/app/libs/upgrade_scripts/upgrade_base.php @@ -8,6 +8,15 @@ * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt} * @version Release: 3.0 */ + +// mysql_set_charset is only available PHP 5 >= 5.2.3 +if (!function_exists('mysql_set_charset')) { + function mysql_set_charset($charset,$dbh) + { + return mysql_query("set names $charset",$dbh); + } +} + class UpgradeBase { public $errors = array(); @@ -136,6 +145,8 @@ protected function connectDb() return 'Could not connect to database!'; } + mysql_set_charset('utf8', $mysql); + //Open the database $mysqldb = mysql_select_db($dbConfig['database']); if (!$mysqldb) { From 63e2b2e7c21b9d04307475775be1d20c34547f27 Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Tue, 19 Aug 2014 11:58:18 -0700 Subject: [PATCH 3/3] Bump version to 3.1.3 --- app/config/core.php | 2 +- readme.md | 6 ++++++ version.txt | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/config/core.php b/app/config/core.php index 38835ab72..fc5e52a04 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -342,7 +342,7 @@ $CWL['applicationID'] = ''; $CWL['applicationPassword'] = ''; - define('IPEER_VERSION', '3.1.2'); + define('IPEER_VERSION', '3.1.3'); /** diff --git a/readme.md b/readme.md index 7958d14cd..74813fcb4 100644 --- a/readme.md +++ b/readme.md @@ -14,6 +14,12 @@ Ruuning the tests: It is better not to touch the mouse or keyboard during the tests. +iPeer 3.1.3 +--------------------------- +This is a maintenance release. +* Fix a bug causing upgrade from 2.x failed +* Improved the language on Student Result Mode help text + iPeer 3.1.2 --------------------------- This is a maintenance release. diff --git a/version.txt b/version.txt index ef538c281..ff365e06b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.1.2 +3.1.3