Skip to content
Snippets Groups Projects
Commit 01f05c68 authored by Антон Шалимов's avatar Антон Шалимов
Browse files

эффект памяти. Пока только для одной дисциплины

parent bee418ce
Branches
Tags
No related merge requests found
...@@ -5,7 +5,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { ...@@ -5,7 +5,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
private function GetSGID($id) private function GetSGID($id)
{ {
# $id = disciplineID # $id = disciplineID
$SG_json = json_decode(Cookie::get('SGID', null)); $SG_json = json_decode(Cookie::get('SGID', null), true);
if ($SG_json !== null) if ($SG_json !== null)
{ {
var_dump($SG_json, $id); var_dump($SG_json, $id);
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<span id="maxRate">Максимальный балл: <b></b></span> <span id="maxRate">Максимальный балл: <b></b></span>
</div> </div>
</div> </div>
<div class="hidden_div"> <div id="hidden_div">
{{ studyGroupID }} { "studyGroupID": "{{ studyGroupID }}" }
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -15,6 +15,13 @@ $(function() { ...@@ -15,6 +15,13 @@ $(function() {
var g_URL = (window.location.href).split("/"); var g_URL = (window.location.href).split("/");
var g_disciplineID = g_URL[g_URL.length - 1]; var g_disciplineID = g_URL[g_URL.length - 1];
// studyGroupID для фильтра
var json_settings = $.parseJSON($("#hidden_div").html());
$("#hidden_div").remove();
filterGroups(json_settings.studyGroupID);
$(".groupSelector [value='"+ json_settings.studyGroupID +"']").attr("selected", "selected");
//console.log(json);
// Скрываем все остальные группы // Скрываем все остальные группы
// 0 - показать все // 0 - показать все
function filterGroups(groupID) { function filterGroups(groupID) {
......
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