Skip to content
Snippets Groups Projects
Commit 7b51ab11 authored by Роман Штейнберг's avatar Роман Штейнберг
Browse files

FIX: final form file name; FIX: dean office controls behavior

parent c6bf73c0
Branches
Tags
No related merge requests found
......@@ -180,6 +180,7 @@ class Controller_Handler_FileCreator extends Controller_Handler
// preparation
$db = $this->model;
$info = $db->getFinalFormInfo($disciplineID, $groupID);
$type = $info[0]['ExamType'];
$templateFile = DOCROOT."docs/template $type.xls";
......@@ -192,7 +193,10 @@ class Controller_Handler_FileCreator extends Controller_Handler
// $specName = ''; <------- TODO
$this->printDisciplineToExcelFile($objPHPExcel, $disciplineID, $groupID, $info[0]);
$this->GetHeaders("FinalForm".$disciplineID."_".$groupID);
$grade = $info[0]["GradeNum"];
$group = $info[0]["GroupNum"];
//$this->GetHeaders("FinalForm".$disciplineID."_".$groupID);
$this->GetHeaders("FinalForm_".$grade."_".$group);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
}
......
var $ = jQuery;
function controlVisualization() {
var disciplineType = $("input[name=DisciplineType]:checked").val();
if (disciplineType === 'exam') {
$("#SelectDisciplineDiv").show();
$("#DownloadStatement").hide();
} else if (disciplineType === 'credit') {
$("#SelectDisciplineDiv").hide();
$("#DownloadStatement").show();
}
}
$(function() {
function controlVisualization() {
var disciplineType = $("input[name=DisciplineType]:checked").val();
if (disciplineType === 'exam') {
$("#SelectDisciplineDiv").show();
$("#DownloadStatement").hide();
} else if (disciplineType === 'credit') {
$("#SelectDisciplineDiv").hide();
$("#DownloadStatement").show();
}
}
// on page loaded
controlVisualization();
var jDownloadStatement = $("#DownloadStatement");
var jDownloadExamDocument = $("#DownloadExamDocument");
var jSelectGroup = $("#SelectGroup");
var jSelectDiscipline = $("#SelectDiscipline");
$("#ExamChoice").change(controlVisualization);
$("#CreditChoice").change(controlVisualization);
//Получить список групп по ID курса
$("#SelectGrade").change(function() {
var gradeID = parseInt($(this).val()) || 0;
var jSelectGroup = $("#SelectGroup");
if (gradeID > 0) {
$.post(
g_URLdir + "handler/GetData/GetGroups",
......@@ -38,6 +40,7 @@ $(function() {
console.log(d.data);
var i = 0;
jSelectGroup.html("<option>-Не выбрана-</option>");
jSelectDiscipline.html("<option>-Не выбрана-</option>");
for (i in d.data)
{
group = d.data[i];
......@@ -56,6 +59,7 @@ $(function() {
jDownloadStatement.attr("disabled", "disabled");
}
jDownloadExamDocument.attr("disabled", 1);
});
$("#SelectGroup").change(function() {
......@@ -64,7 +68,6 @@ $(function() {
jDownloadStatement.removeAttr("disabled");
// Заполнить список дисциплин
var jSelectDiscipline = $("#SelectDiscipline");
$.post(
g_URLdir + "handler/GetData/GetDisciplinesForGroup",
{
......@@ -89,13 +92,15 @@ $(function() {
);
}
else jDownloadStatement.attr("disabled", "disabled");
jDownloadExamDocument.attr("disabled", 1);
});
$("#SelectDiscipline").change(function() {
var disciplineID = parseInt($(this).val()) || 0;
if (disciplineID > 0)
jDownloadExamDocument.removeAttr("disabled");
else jDownloadExamDocument.attr("disabled", "disabled");
else jDownloadExamDocument.attr("disabled", 1);
});
// Скачать ведомость
......
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