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 @@