Commit 877782a6 authored by Denis Khachko's avatar Denis Khachko

Course manager -auto create work file

parent 10ed0de7
......@@ -300,13 +300,22 @@ void MainWindowTask::loadCourse()
loadMarks(fileName);
this->show();
return;
}else
}
bool createDefaultWorkFile=true;
QMessageBox::StandardButton ans;
ans = QMessageBox::question(this, trUtf8("Практикум"), trUtf8("Вы хотите создать тетрадь?"),
QMessageBox::Yes | QMessageBox::No , QMessageBox::Yes);
if (ans == QMessageBox::Yes)
{
createDefaultWorkFile=false;
};
cursWorkFile.setFileName("");
loadCourseData(fileName);
isReadOnly=false;
interface->setPreProgram(QVariant(""));
QString cText=course->courceDescr();
if(cText.right(4)==".htm" ||cText.right(5)==".html" )
{
......@@ -318,6 +327,18 @@ void MainWindowTask::loadCourse()
interface->lockContrls();
ui->checkTask->setEnabled(false);
this->show();
if(createDefaultWorkFile)
{
markProgChange();
//curDir=QDir::currentPath();
qDebug()<<curDir;
cursWorkFile.setFileName(QDir::currentPath()+"/default.work.xml");
saveCourseFile();
}else
{
saveCourse();
};
};
......
Markdown is supported
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