diff --git a/db/StoredProcedures.sql b/db/StoredProcedures.sql index bbc57ba5b68806ce72f32931da69629925cf014f..88d6a0e75429fed183aa1d8bd782549aa69cd947 100644 --- a/db/StoredProcedures.sql +++ b/db/StoredProcedures.sql @@ -352,7 +352,7 @@ END // DROP FUNCTION IF EXISTS GetGradeID// CREATE FUNCTION `GetGradeID`( `Grade` INT, `Degree` VARCHAR(30) charset utf8-- enum('bachelor','master','specialist') - ) RETURNS int(11) + ) RETURNS int(11) NO SQL BEGIN DECLARE res INT; @@ -1567,6 +1567,7 @@ BEGIN END // +-- TODO DROP PROCEDURE IF EXISTS SearchStudents// CREATE PROCEDURE `SearchStudents` ( IN `GradeID` INT, IN `GroupN` INT, @@ -1589,10 +1590,10 @@ BEGIN INNER JOIN `study_groups` ON students.StudyGroupID = study_groups.ID AND ( GradeID = 0 OR GradeID = study_groups.GradeID ) AND ( GroupN = 0 OR GroupN = study_groups.GroupNum ) - INNER JOIN `specializations` ON study_groups.SpecializationID = specializations.ID AND - ( FacultyID = 0 OR FacultyID = specializations.FacultyID ) + INNER JOIN `specializations` ON study_groups.SpecializationID = specializations.ID INNER JOIN `grades` ON study_groups.GradeID = grades.ID - WHERE ( students.LastName LIKE CONCAT(Last,"%") ) AND + WHERE FacultyID = specializations.FacultyID AND + ( students.LastName LIKE CONCAT(Last,"%") ) AND ( students.FirstName LIKE CONCAT(First,"%") ) AND ( students.SecondName LIKE CONCAT(Second,"%") ) ORDER BY grades.ID ASC, study_groups.GroupNum ASC; diff --git a/db/Structure.sql b/db/Structure.sql index 7920bf876ca63374907df933c1ac9f47816d5f2b..2cbf8ea653c4eb6ab62409dbe85e31c2a2834a58 100644 --- a/db/Structure.sql +++ b/db/Structure.sql @@ -446,7 +446,7 @@ CREATE TABLE IF NOT EXISTS `submodules` ( CREATE TABLE IF NOT EXISTS `grades` ( `ID` int(11) NOT NULL AUTO_INCREMENT, - `Grade` int(11) NOT NULL, + `Num` int(11) NOT NULL, `Degree` enum('bachelor','master','specialist') NOT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `Grade_2` (`Grade`,`Degree`) diff --git a/~dev_rating/application/views/teacher/discipline/EditStudents.twig b/~dev_rating/application/views/teacher/discipline/EditStudents.twig index 29ed9d5511b27677371b869f5fab105b014b43d3..bf683bc4c9f21dd21c4f2cb7a7b2a176e05dab46 100644 --- a/~dev_rating/application/views/teacher/discipline/EditStudents.twig +++ b/~dev_rating/application/views/teacher/discipline/EditStudents.twig @@ -81,13 +81,11 @@ <div class="AttachedStudentsList"> <h2 class="BlueTitle">Еще студенты</h2> {% for group in GroupsAttached %} - <div> - <div class="GroupContainerAttached"> - <div class="groupInfo">к. {{ group.GradeNum }}<br>г. {{ group.GroupNum }}</div> - {% for student in group.students %} - {{ idx.outputStudent(student) }} - {% endfor %} - </div> + <div class="GroupContainerAttached"> + <div class="groupInfo">к. {{ group.GradeNum }}<br>г. {{ group.GroupNum }}</div> + {% for student in group.students %} + {{ idx.outputStudent(student) }} + {% endfor %} </div> {% endfor %} </div> diff --git a/~dev_rating/media/css/discipline.css b/~dev_rating/media/css/discipline.css index 796885e060378b1ca41119a36d51bfa97bd1fcae..d6d873447aeec3ef7b46835a6a07771989f05a0b 100644 --- a/~dev_rating/media/css/discipline.css +++ b/~dev_rating/media/css/discipline.css @@ -352,6 +352,11 @@ /* Прикрипление студентов */ .StudentsList {} + +.StudentsList .AttachedStudentsList { + margin-top: 20px; +} + .StudentsList .GradeAndGroupTitle { background: #f1f1f1; padding: 5px 10px; @@ -372,7 +377,7 @@ display: none; } .StudentsList .GroupContainer .hideListAction{ - float: right; + float: left; background: url(icons/triangle_up.png) no-repeat center center #f9f9f9; width: 40px; height: 100%; @@ -383,25 +388,24 @@ } .StudentsList .GroupContainerAttached .groupInfo{ - float: right; + float: left; background: #f9f9f9; width: 40px; height: 100%; margin-top: 10px; - } - .StudentsList .GroupContainerAttached .groupInfo:hover{ - background-color: #e1e1e1;; + + text-align: center; } .StudentsList .Student { - float: left; + float: right; width: 880px; margin-top: 10px; padding: 7px 10px; } .StudentsList .GroupContainerAttached .Student { - float: left; + float: right; width: 880px; margin-top: 10px; padding: 7px 10px; diff --git a/~dev_rating/media/css/forms.css b/~dev_rating/media/css/forms.css index 5869bfb98a9595cf3a334dd861a9f69341306d80..a783c4a27bcf0401261a837582945065e6123bed 100644 --- a/~dev_rating/media/css/forms.css +++ b/~dev_rating/media/css/forms.css @@ -32,5 +32,6 @@ .standartform input[type=button]:hover, .standartform input[type=submit]:hover { - background-color: #009900; + cursor: pointer; + background-color: #009000; } \ No newline at end of file diff --git a/~dev_rating/media/js/discipline/EditStudents.js b/~dev_rating/media/js/discipline/EditStudents.js index 4cb0cbe481730d093dc0d66acb27ff0bb10fb17e..fd775df9af3a35377c8cd9b49c5542be7c2959b2 100644 --- a/~dev_rating/media/js/discipline/EditStudents.js +++ b/~dev_rating/media/js/discipline/EditStudents.js @@ -46,7 +46,7 @@ $(function() { // Поиск студентов - function CallSearchStudents() + function SearchStudents() { var name = []; var temp = $(".InputStudentName").val(); @@ -89,14 +89,14 @@ $(function() { } $(".SelectStudyGroup").change(function(){ - CallSearchStudents(); + SearchStudents(); }); $(".InputStudentName").focusout(function(){ - CallSearchStudents(); + SearchStudents(); }); $(".InputStudentName").keydown(function(e){ if(e.keyCode==13){ - CallSearchStudents(); + SearchStudents(); $(this).blur(); } });