Skip to content

Commit 3437def

Browse files
committed
Merge branch '3.1.x'
2 parents 8771467 + 63e2b2e commit 3437def

File tree

8 files changed

+31
-14
lines changed

8 files changed

+31
-14
lines changed

app/config/core.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
$CWL['applicationID'] = '';
343343
$CWL['applicationPassword'] = '';
344344

345-
define('IPEER_VERSION', '3.1.2');
345+
define('IPEER_VERSION', '3.1.3');
346346

347347

348348
/**

app/controllers/upgrade_controller.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function index()
6363
$dbv = $this->SysParameter->get('database.version');
6464
// workaround for a mistake in a sql templates in v3.0.x where
6565
// we forgot to add the system.version entry into sys_parameters
66-
if (empty($sysv) && $dbv == 4) {
66+
if (empty($sysv) && $dbv == 4 && $this->SysParameter->get('display.vocabulary.department')) {
6767
// upgrading from iPeer v3.0
6868
$sysv = '3.0.x';
6969
$dbv = 5;

app/libs/upgrade_scripts/upgrade_300.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ public function isUpgradable()
3636
$dbv = $sysparameter->get('database.version');
3737
$sysv = $sysparameter->get('system.version');
3838

39-
// If system.version doesn't exist, but we get a database version of 4,
40-
// then that means we're upgrading from a prior iPeer v3 installation
39+
// If system.version doesn't exist, but we get a database version of 4,
40+
// then that means we're upgrading from a prior iPeer v3 installation
4141
// and don't need to run this upgrader.
42-
if (empty($sysv) && $dbv == 4) {
43-
return false;
44-
}
42+
# if (empty($sysv) && $dbv == 4) {
43+
# return false;
44+
# }
4545

4646
return parent::isUpgradable();
4747
}
@@ -69,7 +69,7 @@ public function up()
6969
// when upgrading from v2, will run through all the delta_*.sql files
7070
// up to $this->dbVersion because the database version wasn't stored in
7171
// the database, so PHP get a null value back, which is then treated
72-
// as if we're starting from version 0
72+
// as if we're starting from version 0
7373
$sysparameter = ClassRegistry::init('SysParameter');
7474
$dbv = $sysparameter->getDatabaseVersion();
7575
$ret = $this->patchDb($dbv, $this->dbVersion);

app/libs/upgrade_scripts/upgrade_base.php

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
* @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
99
* @version Release: 3.0
1010
*/
11+
12+
// mysql_set_charset is only available PHP 5 >= 5.2.3
13+
if (!function_exists('mysql_set_charset')) {
14+
function mysql_set_charset($charset,$dbh)
15+
{
16+
return mysql_query("set names $charset",$dbh);
17+
}
18+
}
19+
1120
class UpgradeBase
1221
{
1322
public $errors = array();
@@ -136,6 +145,8 @@ protected function connectDb()
136145
return 'Could not connect to database!';
137146
}
138147

148+
mysql_set_charset('utf8', $mysql);
149+
139150
//Open the database
140151
$mysqldb = mysql_select_db($dbConfig['database']);
141152
if (!$mysqldb) {

app/views/events/add.ctp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ echo $this->Form->input(
5353
'default' => '1'
5454
)
5555
); ?>
56-
<div class='help-text'><?php echo _t('Basic view only show averages of questions') ?></div>
56+
<div class='help-text'><?php echo _t('Basic view only shows grades. Detailed view shows both grades and comments') ?></div>
5757
<?php
5858
echo $this->Form->input('due_date', array('type' => 'text'));
5959
echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text'));
@@ -62,15 +62,15 @@ echo $this->Form->input('result_release_date_begin',
6262
array('div' => array('id' => 'ResultReleaseBeginDiv'), 'label' => 'Results Released From', 'type' => 'text'));
6363
echo $this->Form->input('result_release_date_end',
6464
array('div' => array('id' => 'ResultReleaseEndDiv'), 'label' => 'Until', 'type' => 'text'));
65-
65+
6666
echo $this->Form->input(
6767
'email_schedule',
6868
array(
6969
'label' => 'Email Reminder Frequency ',
7070
'options' => $emailSchedules,
7171
'div' => array('id' => 'emailSchedule')
7272
)
73-
);
73+
);
7474
?>
7575
<div class='email-help-text'><?php __('Select the number of days in between each email reminder for submitting
7676
evaluations. The first email is sent when the event is released.') ?></div>

app/views/events/edit.ctp

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ echo $this->Form->input(
8484
'default' => '1'
8585
)
8686
); ?>
87-
<div class='help-text'><?php echo _t('Basic view only show averages of questions') ?></div>
87+
<div class='help-text'><?php echo _t('Basic view only shows grades. Detailed view shows both grades and comments') ?></div>
8888
<?php
8989
echo $this->Form->input('due_date', array('type' => 'text'));
9090
echo $this->Form->input('release_date_begin', array('label' => 'Evaluation Released From', 'type' => 'text'));
@@ -102,7 +102,7 @@ echo $this->Form->input(
102102
'default' => "$email_schedule",
103103
'div' => array('id' => 'emailSchedule')
104104
)
105-
);
105+
);
106106
?>
107107
<div class='email-help-text'><?php __('Select the number of days in between each email reminder for submitting
108108
evaluations. The first email is sent when the event is released.') ?></div>

readme.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Ruuning the tests:
1414

1515
It is better not to touch the mouse or keyboard during the tests.
1616

17+
iPeer 3.1.3
18+
---------------------------
19+
This is a maintenance release.
20+
* Fix a bug causing upgrade from 2.x failed
21+
* Improved the language on Student Result Mode help text
22+
1723
iPeer 3.1.2
1824
---------------------------
1925
This is a maintenance release.

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.2
1+
3.1.3

0 commit comments

Comments
 (0)