Skip to content
Snippets Groups Projects
Commit a6313723 authored by Turchin's avatar Turchin
Browse files

Merge branch 'issue-12' of http://gitlab.mmcs.sfedu.ru/Nekrolm/grade into issue-12

parents 332f92e2 1ec7aaab
Branches
Tags
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
......@@ -20,3 +20,5 @@ Thumbs.db
*.project
*.idea
*nbproject
.settings
.buildpath
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorList
USER_MANUAL_PREFERENCE=enabledManualValidatorList
USER_PREFERENCE=overrideGlobalPreferencesfalse
eclipse.preferences.version=1
override=false
suspend=false
vf.version=3
......@@ -14,8 +14,8 @@ return array
* boolean persistent use persistent connections?
*/
'dsn' => 'mysql:host=127.0.0.1;dbname=mmcs_rating',
'username' => 'root',
'password' => '',
'username' => 'mmcs_rating',
- 'password' => 'Pefnesdy',
'persistent' => FALSE,
'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')
),
......
......@@ -176,12 +176,6 @@ Route::set('sign:restore', 'remind/<token>')
'action' => 'restore',
]);
//Route::set('handler2', 'handler/task/get')
// ->defaults([
// 'directory' => 'Handler',
// 'controller' => 'Task',
// 'action' => 'get',
// ]);
// --------------- Ajax features ----------------
Route::set('handler', 'handler/<controller>(/<action>(/<id>))')
......
......@@ -16,6 +16,7 @@ class Controller_DeanOffice_Bill extends Controller_Environment_DeanOffice
foreach ($disciplines as &$dis) {
$disInfo = Model_Discipline::getDisciplineRateInfo($dis['ID']);
//echo Debug::vars($disInfo);
$rates = Model_Rating::getRatesForStudentsGroup((int)$dis['ID'], $groupID);
foreach ($rates as $record) {
if (!isset($table[$record['ID']])) {
......@@ -31,7 +32,7 @@ class Controller_DeanOffice_Bill extends Controller_Environment_DeanOffice
'bonus' => $record['bonus'],
'exam' => $record['exam']
],
'debt' => $record['intermediate'] + $record['bonus'] + $record['exam'] < 0.6 * $disInfo['Current']
'debt' => (float)($record['intermediate'] + $record['bonus'] + $record['exam']) < 0.6 * $disInfo['Current']
];
}
//check: student may not be attach to discipline
......
......@@ -146,7 +146,7 @@ class Model_Discipline extends Model_Container
public static function getDisciplineRateInfo($disciplineID) {
$sql = "CALL `GetDisciplineRateInfo`(:id)";
return DB::query(Database::SELECT, $sql)
->param(':id', $disciplineID)->execute()->as_array();
->param(':id', $disciplineID)->execute()->as_array()[0];
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment