Commit 9b9ce581 authored by Denis Khachko's avatar Denis Khachko

Bug Fixes

parent 4f5aaa3a
......@@ -145,7 +145,9 @@ void Plugin::startProgram(QVariant param,KumZadanie* task)
{
field_no=0;
cur_task=task;
checkNext( task);
selectNext( task);
GI * gui = ExtensionSystem::PluginManager::instance()->findPlugin<GI>();
gui->startTesting();
};
QAction* Plugin::actionPerformCheck() const
{
......
......@@ -35,6 +35,10 @@ public:
void setPreProgram(QVariant param);
void startProgram(QVariant param,KumZadanie* task);
void checkNext(KumZadanie* task);
void showMW()
{
mainWindow()->showNormal();
}
public slots:
void setEnabled(bool value);
void setTestingResult(ProgramRunStatus status, int value);
......
......@@ -235,6 +235,7 @@ void MainWindowTask::loadCourse()
if(fileName.right(9)==".work.xml")//Загрузка оценок и программ
{
loadMarks(fileName);
this->show();
return;
}else
cursWorkFile.setFileName("");
......@@ -250,7 +251,7 @@ void MainWindowTask::loadCourse()
setWindowTitle(course->name()+trUtf8(" - Практикум"));
interface->lockContrls();
ui->checkTask->setEnabled(false);
this->showNormal();
this->show();
};
......
......@@ -106,19 +106,19 @@ bool hasWrongSymbols(const QString & s) {
return false;
}
KumFile::Data KumFile::insertTeacherMark(KumFile::Data & data)//Insert |#%% if needed.
KumFile::Data KumFile::insertTeacherMark(KumFile::Data & data)//Inserts |#%% if needed.
{
static const QRegExp teacherMark("^|#%%");
if(data.visibleText.indexOf("\n|#%%")>-1)
static const QRegExp teacherMark("^\\|#%%");
if(data.visibleText.indexOf(teacherMark)>-1)
{
qDebug()<<" TM POS:"<<data.visibleText.indexOf("\n|#%%");
//qDebug()<<" TM POS:"<<data.visibleText.indexOf("\n|#%%");
return data;
};
if(data.visibleText.indexOf("\n|#%%")>-1)
{ qDebug()<<" TM POS:"<<data.visibleText.indexOf("\n|#%%");
if(data.visibleText.indexOf(teacherMark)>-1)
{ // qDebug()<<" TM POS:"<<data.visibleText.indexOf("\n|#%%");
return data;
};
static const QRegExp speclAlg(QString::fromUtf8("^|\\s*алг\\s*(\\S\\S\\S)?\\s*@"));
static const QRegExp speclAlg(QString::fromUtf8("^\\s*алг\\s*(\\S\\S\\S)?\\s*@"));
int pos=data.hiddenText.indexOf(speclAlg);
if(pos>-1)
{
......
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