diff --git a/app/config/core.php b/app/config/core.php
index 6343cba60..38835ab72 100644
--- a/app/config/core.php
+++ b/app/config/core.php
@@ -342,7 +342,7 @@
$CWL['applicationID'] = '';
$CWL['applicationPassword'] = '';
- define('IPEER_VERSION', '3.1.1');
+ define('IPEER_VERSION', '3.1.2');
/**
diff --git a/app/controllers/components/evaluation.php b/app/controllers/components/evaluation.php
index ce7cf0f6d..2b329942a 100644
--- a/app/controllers/components/evaluation.php
+++ b/app/controllers/components/evaluation.php
@@ -486,7 +486,7 @@ function loadRubricEvaluationDetail($event)
$this->EvaluationRubricDetail = new EvaluationRubricDetail;
$this->Rubric = new Rubric;
$this->User = ClassRegistry::init('User');
-
+
$Session = new SessionComponent();
$user = $Session->read('Auth.User');//User or Admin or
$evaluator = $user['id'];
@@ -715,7 +715,7 @@ function formatRubricEvaluationResultsMatrix($evalResult)
$grades = Set::extract($summary, '/grades/'.$num);
$group['grades'][$num] = array_sum($grades) / count($grades);
}
-
+
return $summary + $group;
}
@@ -826,12 +826,12 @@ function loadMixEvaluationDetail ($event)
/**
* saveMixevalEvaluation
*
- * @param bool $params
+ * @param array $params mixeval array
*
* @access public
* @return void
*/
- function saveMixevalEvaluation($params=null)
+ function saveMixevalEvaluation($params)
{
$this->Event = ClassRegistry::init('Event');
$this->Mixeval = ClassRegistry::init('Mixeval');
@@ -863,13 +863,14 @@ function saveMixevalEvaluation($params=null)
$this->EvaluationMixeval->save($evalMixeval);
$evalMixeval = $this->EvaluationMixeval->read();
}
-
+
$score = $this->saveNGetEvaluationMixevalDetail(
$evalMixeval['EvaluationMixeval']['id'], $mixeval, $params);
$evalMixeval['EvaluationMixeval']['score'] = $score;
if (!$this->EvaluationMixeval->save($evalMixeval)) {
return false;
}
+
return true;
}
@@ -890,7 +891,7 @@ function saveNGetEvaluationMixevalDetail($evalMixevalId, $mixeval, $form)
$this->EvaluationMixeval = ClassRegistry::init('EvaluationMixeval');
$totalGrade = 0;
$data = $form['EvaluationMixeval'];
-
+
foreach($mixeval['MixevalQuestion'] as $ques) {
$num = $ques['question_num'];
$evalMixevalDetail = $this->EvaluationMixevalDetail->getByEvalMixevalIdCriteria($evalMixevalId, $num);
@@ -899,13 +900,13 @@ function saveNGetEvaluationMixevalDetail($evalMixevalId, $mixeval, $form)
}
$evalMixevalDetail['EvaluationMixevalDetail']['evaluation_mixeval_id'] = $evalMixevalId;
$evalMixevalDetail['EvaluationMixevalDetail']['question_number'] = $num;
-
+
if (in_array($ques['mixeval_question_type_id'], array('1','4'))) {
if (empty($data[$num]['selected_lom']) && $ques['mixeval_question_type_id'] != '4' ) {
continue;
}
if ($ques['mixeval_question_type_id'] == '1') {
- $evalMixevalDetail['EvaluationMixevalDetail']['selected_lom'] = $data[$num]['selected_lom'];
+ $evalMixevalDetail['EvaluationMixevalDetail']['selected_lom'] = $data[$num]['selected_lom'];
}
$evalMixevalDetail['EvaluationMixevalDetail']['grade'] = $data[$num]['grade'];
if ($ques['required'] && !$ques['self_eval']) {
@@ -920,7 +921,7 @@ function saveNGetEvaluationMixevalDetail($evalMixevalId, $mixeval, $form)
}
$evalMixevalDetail['EvaluationMixevalDetail']['question_comment'] = $data[$num]['question_comment'];
}
-
+
$this->EvaluationMixevalDetail->save($evalMixevalDetail);
$this->EvaluationMixevalDetail->id=null;
}
@@ -962,7 +963,7 @@ function getMixevalResultDetail($groupEventId, $groupMembers, $include)
return $mixevalResultDetail;
}
-
+
/**
* formatMixevalEvaluationResultsMatrix
* results matrix format:
@@ -1033,7 +1034,7 @@ function getStudentViewMixevalResultDetailReview ($event, $userId)
}
return $evalResult;
}
-
+
/**
* changeMixevalEvaluationGradeRelease
@@ -1050,7 +1051,7 @@ function changeMixevalEvaluationGradeRelease ($groupEventId, $evaluateeId, $rele
$this->EvaluationMixeval = ClassRegistry::init('EvaluationMixeval');
$this->GroupEvent = ClassRegistry::init('GroupEvent');
$this->EvaluationSubmission = ClassRegistry::init('EvaluationSubmission');
-
+
$sub = $this->EvaluationSubmission->findAllByGrpEventId($groupEventId);
$sub = Set::extract('/EvaluationSubmission/submitter_id', $sub);
@@ -1092,7 +1093,7 @@ function changeMixevalEvaluationCommentRelease ($groupEventId, $evaluateeId, $re
$this->GroupEvent->id = $groupEventId;
$groupEvent = $this->GroupEvent->read();
-
+
$sub = $this->EvaluationSubmission->findAllByGrpEventId($groupEventId);
$sub = Set::extract('/EvaluationSubmission/submitter_id', $sub);
diff --git a/app/plugins/guard b/app/plugins/guard
index 329960c13..25f26ab4b 160000
--- a/app/plugins/guard
+++ b/app/plugins/guard
@@ -1 +1 @@
-Subproject commit 329960c13761bdfbd591251871aea5fb1c5bc540
+Subproject commit 25f26ab4b9b6593be943a804276edc5d61fdb9da
diff --git a/app/views/accesses/view.ctp b/app/views/accesses/view.ctp
index ea385e6e6..1a0bec617 100644
--- a/app/views/accesses/view.ctp
+++ b/app/views/accesses/view.ctp
@@ -51,19 +51,19 @@ function fnFormatDetails (oTable, nTr)
actions[i-2] = 'Allow';
}
}
-
+
var sOut = '
';
-
+
return sOut;
}
@@ -88,16 +88,16 @@ jQuery(document).ready(function() {
"sPaginationType" : "full_numbers",
"aoColumnDefs": [
{ "bSearchable": false, "bSortable": false, "aTargets": [2, 3, 4, 5] },
- { "bSearchable": false, "bVisible": false, "bSortable":false, "aTargets": [ 0 ] }
+ { "bSearchable": false, "bVisible": false, "bSortable":false, "aTargets": [ 0 ] }
],
"aaSorting" : [[1, 'asc']]
});
-
+
// for changing between roles
jQuery("#role").change(function() {
- window.location.href="/accesses/view/" + jQuery(this).val();
+ window.location.href="Html->url('/accesses/view')?>/" + jQuery(this).val();
});
-
+
// event listener for action links
jQuery('#table_id tbody td').live('click', function() {
var nTr = jQuery(this).parents('tr')[0];
@@ -109,4 +109,4 @@ jQuery(document).ready(function() {
});
});
-
\ No newline at end of file
+
diff --git a/app/views/elements/global/banner.ctp b/app/views/elements/global/banner.ctp
index d1eccf47f..040eec8e2 100644
--- a/app/views/elements/global/banner.ctp
+++ b/app/views/elements/global/banner.ctp
@@ -1,6 +1,6 @@
-
+' id='home'>
image('layout/ipeer_logo.png',
array('id'=>'bannerLogoImgLeft', 'alt'=>'logo')
diff --git a/app/views/elements/mixevals/view_mixeval_details.ctp b/app/views/elements/mixevals/view_mixeval_details.ctp
index abe971702..229e14d00 100644
--- a/app/views/elements/mixevals/view_mixeval_details.ctp
+++ b/app/views/elements/mixevals/view_mixeval_details.ctp
@@ -49,20 +49,14 @@ foreach ($questions as $ques) {
$descs = array();
$marks = array();
$markLabel = __("Mark", true).": ";
- $subIf0 = 0;
- if ($zero_mark) {
- $subIf0 = 1;
- $scale -= $subIf0;
- }
+
foreach ($ques['MixevalQuestionDesc'] as $key => $desc) {
$descs[] = $desc['descriptor'];
if ($desc['scale_level'] == 0) {
- // upgraded from pre 3.1, scale_levels are set to 0. So use $key as level
- $desc['scale_level'] = $subIf0 ? $key : $key + 1;
- } else {
- $desc['scale_level'] -= $subIf0;
+ // upgraded from pre 3.1, scale_levels are set to 0. So use $key as level, scale_level starts from 1
+ $desc['scale_level'] = $key + 1;
}
- $mark = $highestMark * ($desc['scale_level'] / $scale);
+ $mark = $highestMark * (($desc['scale_level'] - $zero_mark) / ($scale - $zero_mark));
$checked = '';
if (isset($details[$num])) {
$checked = ($details[$num]['selected_lom'] == $desc['scale_level']) ? 'checked' : '';
diff --git a/app/views/errors/missing_connection.ctp b/app/views/errors/missing_connection.ctp
index 5e9d2d537..760e476ab 100644
--- a/app/views/errors/missing_connection.ctp
+++ b/app/views/errors/missing_connection.ctp
@@ -1,5 +1,5 @@
-
installation first. Otherwise make sure you define in it app/config/database.php in the following format:')?>
+
app/config/database.php in the following format:', $this->Html->link('installation', '/install'))?>
<?php
diff --git a/app/views/evaluations/view_simple_evaluation_results.ctp b/app/views/evaluations/view_simple_evaluation_results.ctp
index 6fe64c40b..0df736453 100644
--- a/app/views/evaluations/view_simple_evaluation_results.ctp
+++ b/app/views/evaluations/view_simple_evaluation_results.ctp
@@ -234,7 +234,7 @@ foreach ($results['evaluatees'] as $evaluatee) {
$button = $form->button(
$buttonName,
array(
- 'onclick' => "location.href='/evaluations/markGradeRelease/$eventId;$groupId;$evaluateeId;$grpEventId;$releaseAction'"
+ 'onclick' => "location.href='".$this->Html->url('/evaluations/markGradeRelease')."/$eventId;$groupId;$evaluateeId;$grpEventId;$releaseAction'"
)
);
}
diff --git a/app/views/home/index.ctp b/app/views/home/index.ctp
index fcf86eaad..ac8d7fb9c 100644
--- a/app/views/home/index.ctp
+++ b/app/views/home/index.ctp
@@ -89,7 +89,7 @@ if (isset($course_list['I']))
- User Documentations.
+ User Documentations')?>.
diff --git a/app/views/install/index.ctp b/app/views/install/index.ctp
index 053e740c4..4828c5e66 100644
--- a/app/views/install/index.ctp
+++ b/app/views/install/index.ctp
@@ -15,7 +15,7 @@ $yes = ''.__('Yes', true).'';
// Mandatory requirements init
$phpver = $no;
-$REQPHPVER = '5.0';
+$REQPHPVER = '5.3';
$mysql = $no;
$configwritable = $no;
$dbconfig = $no;
@@ -70,7 +70,7 @@ $domdoc = (extension_loaded('dom') && class_exists('DOMDocument')) ? $yes : $no;
// make sure that the php memory limit is at least 64 mb
$limit = ini_get('memory_limit');
$unit = substr($limit, -1);
-// convert to bytes
+// convert to bytes
if ($limit == -1) $limit = 9999999999999; # no memory limit
else if (strcasecmp($unit, 'k') == 0) $limit *= 1024;
else if (strcasecmp($unit, 'm')) $limit *= 1024 * 1024;
diff --git a/app/views/install/install2.ctp b/app/views/install/install2.ctp
index 17b388768..672a7fd12 100644
--- a/app/views/install/install2.ctp
+++ b/app/views/install/install2.ctp
@@ -17,22 +17,22 @@ function agreesubmit() {
Step 2: License Agreement
- iPeer
-
+ iPeer
+
-
diff --git a/cake/console/cake b/cake/console/cake
index fbef004b1..9395de059 100755
--- a/cake/console/cake
+++ b/cake/console/cake
@@ -28,6 +28,6 @@ done
LIB=$(dirname -- "$LIB")/
APP=`pwd`
-exec php -q "$LIB"cake.php -working "$APP" "$@"
+exec php -q -d register_argc_argv=1 "$LIB"cake.php -working "$APP" "$@"
exit;
diff --git a/readme.md b/readme.md
index 36f2fef54..7958d14cd 100644
--- a/readme.md
+++ b/readme.md
@@ -14,6 +14,15 @@ Ruuning the tests:
It is better not to touch the mouse or keyboard during the tests.
+iPeer 3.1.2
+---------------------------
+This is a maintenance release.
+* Fix #567, grade release button failed when install in subdir
+* Fix cron email job failed when register_argc_argv is off
+* Update guard plugin
+* Update requirement to PHP 5.3
+* Fix #564, students unable to submit 0 mark in the mixeval
+
iPeer 3.1.1
---------------------------
This is a maintenance release.
diff --git a/version.txt b/version.txt
index 94ff29cc4..ef538c281 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-3.1.1
+3.1.2