Skip to content
Snippets Groups Projects
Commit 491e18a9 authored by xamgore's avatar xamgore
Browse files

Merge remote-tracking branch 'gitlab/master'

parents 25d84c8f fbde4b0d
Branches
No related merge requests found
...@@ -24,9 +24,7 @@ class Controller_Handler_Credits extends Controller_Handler ...@@ -24,9 +24,7 @@ class Controller_Handler_Credits extends Controller_Handler
} }
public function action_setCreditMilestone() { public function action_setCreditMilestone() {
$id = (int) $this->request->param("param1"); list($id, $stage) = explode(":", $this->request->param("id"));
$stage = (int) $this->request->param("param2");
Model_Discipline::load($id)->setMilestone($stage); Model_Discipline::load($id)->setMilestone($stage);
$this->response->body(''); $this->response->body('');
} }
......
...@@ -148,7 +148,7 @@ class Model_Discipline extends Model_Container ...@@ -148,7 +148,7 @@ class Model_Discipline extends Model_Container
* @param $stage int number from 0 to 3 * @param $stage int number from 0 to 3
*/ */
public function setMilestone($stage) { public function setMilestone($stage) {
if ($stage >= 0 && $stage <= 3) if ($stage < 0 || $stage > 3)
throw new LogicException('Milestone argument is incorrect!'); throw new LogicException('Milestone argument is incorrect!');
$this->Milestone = $stage; $this->Milestone = $stage;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{ parent() }} {{ parent() }}
{{ HTML.script('static/js/libs/jquery.fileDownload.js')|raw }} {{ HTML.script('static/js/libs/jquery.fileDownload.js')|raw }}
{{ HTML.style('static/css/discipline.css')|raw }} {{ HTML.style('static/css/discipline.css')|raw }}
{{ HTML.script('static/js/dean_office/credits.js')|raw }} {{ HTML.script('static/js/dean/credits.js')|raw }}
{{ HTML.script('static/js/libs/select2.js')|raw }} {{ HTML.script('static/js/libs/select2.js')|raw }}
{{ HTML.style('static/css/select2.css')|raw }} {{ HTML.style('static/css/select2.css')|raw }}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{ parent() }} {{ parent() }}
{{ HTML.script('static/js/libs/jquery.fileDownload.js')|raw }} {{ HTML.script('static/js/libs/jquery.fileDownload.js')|raw }}
{{ HTML.style('static/css/discipline.css')|raw }} {{ HTML.style('static/css/discipline.css')|raw }}
{{ HTML.script('static/js/dean_office/dean.js')|raw }} {{ HTML.script('static/js/dean/dean.js')|raw }}
{% endblock %} {% endblock %}
{% block main_top_title %}Деканат > Ведомости{% endblock %} {% block main_top_title %}Деканат > Ведомости{% endblock %}
...@@ -90,4 +90,4 @@ ...@@ -90,4 +90,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
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