Skip to content
Snippets Groups Projects
Commit 4a3975b9 authored by PavelBegunkov's avatar PavelBegunkov
Browse files

course work link

parent a712eb3e
Branches
Tags
No related merge requests found
......@@ -7,12 +7,23 @@ class Controller_Teacher_Discipline extends Controller_UserEnvironment {
$disciplineCreationType = $this->request->param('type');
if ($disciplineCreationType === 'regular')
$this->createRegularDiscipline();
else if ($disciplineCreationType === 'coursework')
$this->createCourseWorkDiscipline();
}
private function createRegularDiscipline()
{
$twig = Twig::factory('teacher/discipline/CreateDiscipline');
$db = new Model_Map;
$twig->User = $this->user;
$twig->FacultiesList = Model_Faculties::toArray();
$twig->SubjectsList = Model_Subjects::byFaculty($this->user['FacultyID']);
$twig->GradesList = Model_Grades::toArray();
$this->response->body($twig);
}
private function createCourseWorkDiscipline()
{
$twig = Twig::factory('teacher/discipline/CreateDiscipline');
$twig->User = $this->user;
$twig->FacultiesList = Model_Faculties::toArray();
$twig->SubjectsList = Model_Subjects::byFaculty($this->user['FacultyID']);
......
......@@ -37,19 +37,19 @@
</div>
<p class="comment">Нужно указать подразделение, в котором читается дисциплина.</p>
</div>
<div class="LayerSection">
<div class="itemBlock">
<div class="title">Тип курсовой работы:</div>
<div class="field">
<div class="RadioGroupDiv">
<label><input class="DiscType" name="DiscType" type="radio" value="credit" checked="true"> По дисциплине</label>
</div>
<div class="RadioGroupDiv">
<label><input class="DiscType" name="DiscType" type="radio" value="exam"> Научная</label>
</div>
</div>
</div>
</div>
{#<div class="LayerSection">#}
{#<div class="itemBlock">#}
{#<div class="title">Тип курсовой работы:</div>#}
{#<div class="field">#}
{#<div class="RadioGroupDiv">#}
{#<label><input class="DiscType" name="DiscType" type="radio" value="credit" checked="true"> По дисциплине</label>#}
{#</div>#}
{#<div class="RadioGroupDiv">#}
{#<label><input class="DiscType" name="DiscType" type="radio" value="exam"> Научная</label>#}
{#</div>#}
{#</div>#}
{#</div>#}
{#</div>#}
<div class="LayerSection">
<div class="itemBlock">
<div class="title">Предмет:</div>
......
......@@ -79,7 +79,7 @@ $(function() {
jExamTypeRadio.change(function() {
var examType = $(this).val();
if (examType == "exam" || examType == "credit")
if (examType === "exam" || examType === "credit")
$(this).parent().parent().css("background-color", "#fff");
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment