Skip to content

Commit

Permalink
Merge branch '3.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Aug 19, 2014
2 parents 8771467 + 63e2b2e commit 3437def
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
$CWL['applicationID'] = '';
$CWL['applicationPassword'] = '';

define('IPEER_VERSION', '3.1.2');
define('IPEER_VERSION', '3.1.3');


/**
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/upgrade_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions app/libs/upgrade_scripts/upgrade_300.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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);
Expand Down
11 changes: 11 additions & 0 deletions app/libs/upgrade_scripts/upgrade_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions app/views/events/add.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ echo $this->Form->input(
'default' => '1'
)
); ?>
<div class='help-text'><?php echo _t('Basic view only show averages of questions') ?></div>
<div class='help-text'><?php echo _t('Basic view only shows grades. Detailed view shows both grades and comments') ?></div>
<?php
echo $this->Form->input('due_date', array('type' => 'text'));
echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text'));
Expand All @@ -62,15 +62,15 @@ 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(
'label' => 'Email Reminder Frequency ',
'options' => $emailSchedules,
'div' => array('id' => 'emailSchedule')
)
);
);
?>
<div class='email-help-text'><?php __('Select the number of days in between each email reminder for submitting
evaluations. The first email is sent when the event is released.') ?></div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/edit.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ echo $this->Form->input(
'default' => '1'
)
); ?>
<div class='help-text'><?php echo _t('Basic view only show averages of questions') ?></div>
<div class='help-text'><?php echo _t('Basic view only shows grades. Detailed view shows both grades and comments') ?></div>
<?php
echo $this->Form->input('due_date', array('type' => 'text'));
echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text'));
Expand All @@ -102,7 +102,7 @@ echo $this->Form->input(
'default' => "$email_schedule",
'div' => array('id' => 'emailSchedule')
)
);
);
?>
<div class='email-help-text'><?php __('Select the number of days in between each email reminder for submitting
evaluations. The first email is sent when the event is released.') ?></div>
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.1.3

0 comments on commit 3437def

Please sign in to comment.