diff --git a/DOCS/Андрей/Board.md b/DOCS/Андрей/Board.md
index a069a07..64efdab 100644
--- a/DOCS/Андрей/Board.md
+++ b/DOCS/Андрей/Board.md
@@ -11,6 +11,7 @@ kanban-plugin: board
## Complete
+- [ ] Блокировка авторизации не работает при входе в редакторы И/О
- [ ] Добавить текущий статус задачи в "Проверке задачи" (AMM, FIM)
- [ ] выдавать trainee_id при авторизации и вытащить передачу Trainee ID из тасок
- [ ] Подсчет учебного времени - дельта между включением и выключением
@@ -60,12 +61,6 @@ kanban-plugin: board
- [ ] Сделать отправку сообщения на Enter
-## ConnectorToServer
-
-- [ ] MutexAccess
-- [ ] Запрос AMM и FIM xml продумать
-
-
## Интерфейс
- [ ] Унифицировать терминологию
@@ -74,7 +69,6 @@ kanban-plugin: board
## GUI общие
- [ ] Введение логина только латиницей
-- [ ] Блокировка авторизации не работает при входе в редакторы И/О
## Замечания Кирилл
@@ -88,6 +82,6 @@ kanban-plugin: board
%% kanban:settings
```
-{"kanban-plugin":"board","list-collapse":[false,false,false,false,false,false,false,false,false]}
+{"kanban-plugin":"board","list-collapse":[false,false,false,false,false,false,false,false]}
```
%%
\ No newline at end of file
diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp
index 4dfd8f8..231e35d 100644
--- a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp
+++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp
@@ -471,15 +471,13 @@ void ConnectorToServer::bindConnection()
connect(this,&ConnectorToServer::sigSetConnect,client,&TCPClient::setConnect,Qt::AutoConnection);
connect(this,&ConnectorToServer::sigStopConnect,client,&TCPClient::setDisconnect,Qt::AutoConnection);
- //Sconnect(this,&ConnectorToServer::signal_sendXMLmsgGUItoServer,sendSystem,&SendSystem::sendXMLmsgGUItoServer);
connect(this,&ConnectorToServer::sigSendAnswerToServer,sendSystem,&SendSystem::sendXMLAnswer,Qt::AutoConnection);
- connect(recognizeSystem,&RecognizeSystem::sigAuth,this,&ConnectorToServer::slot_Auth); // ::sigLoginResult);
+ connect(recognizeSystem,&RecognizeSystem::sigAuth,this,&ConnectorToServer::slot_Auth);
connect(recognizeSystem,&RecognizeSystem::sigDeAuth,this,&ConnectorToServer::sigDeLoginResult);
connect(recognizeSystem,&RecognizeSystem::signal_ReceiveMessage,this,&ConnectorToServer::signal_receiveMessage,Qt::AutoConnection);
connect(recognizeSystem,&RecognizeSystem::sigShowServerDataList,this,&ConnectorToServer::showServerList);
connect (recognizeSystem,&RecognizeSystem::sigSetVersion,versionContainer,&VersionContainer::setServerVersionData);
- //connect(recognizeSystem,&RecognizeSystem::sigAnswerQueryToDB,this,&ConnectorToServer::slot_AnswerQueryToDB);
connect(recognizeSystem,&RecognizeSystem::sigAnswerQueryToDB_ListInstructors,this,&ConnectorToServer::slot_AnswerQueryToDB_ListInstructors);
connect(recognizeSystem,&RecognizeSystem::sigAnswerQueryToDB_ListGroups,this,&ConnectorToServer::slot_AnswerQueryToDB_ListGroups);
diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.h b/InstructorsAndTrainees/connectorToServer/connectortoserver.h
index 0b28001..38d9f42 100644
--- a/InstructorsAndTrainees/connectorToServer/connectortoserver.h
+++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.h
@@ -101,8 +101,6 @@ signals:
SendSystem *sendSystem,
QThread *thread);
- //void signal_sendXMLmsgGUItoServer(QByteArray array);
-
void sigLoginResult(ServerAuthorization * serverAuth);
void sigDeLoginResult(ServerDeAuthorization * serverDeAuth);
diff --git a/ServerLMS/providerdblms.cpp b/ServerLMS/providerdblms.cpp
index 940e990..02ff9aa 100644
--- a/ServerLMS/providerdblms.cpp
+++ b/ServerLMS/providerdblms.cpp
@@ -64,11 +64,11 @@ bool ProviderDBLMS::authorizationTrainee(QString login, QString password, QStrin
return false;
}
- Q_EMIT signal_BlockAutorization(true);
+ //Q_EMIT signal_BlockAutorization(true);
bool res = dbLMS->authorizationTrainee(login, password, classroom_name, computer_name);
- Q_EMIT signal_BlockAutorization(false);
+ //Q_EMIT signal_BlockAutorization(false);
mtxAccess.unlock();
return res;
@@ -84,11 +84,11 @@ bool ProviderDBLMS::deAuthorizationTrainee(QString login)
return false;
}
- Q_EMIT signal_BlockAutorization(true);
+ //Q_EMIT signal_BlockAutorization(true);
bool res = dbLMS->deAuthorizationTrainee(login);
- Q_EMIT signal_BlockAutorization(false);
+ //Q_EMIT signal_BlockAutorization(false);
mtxAccess.unlock();
return res;
@@ -120,11 +120,11 @@ bool ProviderDBLMS::authorizationInstructor(QString login, QString password)
return false;
}
- Q_EMIT signal_BlockAutorization(true);
+ //Q_EMIT signal_BlockAutorization(true);
bool res = dbLMS->authorizationInstructor(login, password);
- Q_EMIT signal_BlockAutorization(false);
+ //Q_EMIT signal_BlockAutorization(false);
mtxAccess.unlock();
return res;
@@ -140,11 +140,11 @@ bool ProviderDBLMS::deAuthorizationInstructor(QString login)
return false;
}
- Q_EMIT signal_BlockAutorization(true);
+ //Q_EMIT signal_BlockAutorization(true);
bool res = dbLMS->deAuthorizationInstructor(login);
- Q_EMIT signal_BlockAutorization(false);
+ //Q_EMIT signal_BlockAutorization(false);
mtxAccess.unlock();
return res;
diff --git a/ServerLMS/resources.qrc b/ServerLMS/resources.qrc
index 73ebc38..90dd041 100644
--- a/ServerLMS/resources.qrc
+++ b/ServerLMS/resources.qrc
@@ -7,5 +7,10 @@
resources/icons/switchOn.png
resources/blankXML/ListTasksAMM.xml
resources/blankXML/ListTasksFIM.xml
+ resources/icons/circleGreen.png
+ resources/icons/circleRed.png
+ resources/icons/lock.png
+ resources/icons/unlock.png
+ resources/icons/open.png
diff --git a/ServerLMS/resources/icons/circleGreen.png b/ServerLMS/resources/icons/circleGreen.png
new file mode 100644
index 0000000..62281b1
Binary files /dev/null and b/ServerLMS/resources/icons/circleGreen.png differ
diff --git a/ServerLMS/resources/icons/circleRed.png b/ServerLMS/resources/icons/circleRed.png
new file mode 100644
index 0000000..9f4f1cb
Binary files /dev/null and b/ServerLMS/resources/icons/circleRed.png differ
diff --git a/ServerLMS/resources/icons/lock.png b/ServerLMS/resources/icons/lock.png
new file mode 100644
index 0000000..e970b1e
Binary files /dev/null and b/ServerLMS/resources/icons/lock.png differ
diff --git a/ServerLMS/resources/icons/open.png b/ServerLMS/resources/icons/open.png
new file mode 100644
index 0000000..3c03b17
Binary files /dev/null and b/ServerLMS/resources/icons/open.png differ
diff --git a/ServerLMS/resources/icons/unlock.png b/ServerLMS/resources/icons/unlock.png
new file mode 100644
index 0000000..0b14529
Binary files /dev/null and b/ServerLMS/resources/icons/unlock.png differ
diff --git a/ServerLMS/serverlmswidget.cpp b/ServerLMS/serverlmswidget.cpp
index 8277914..f0a5aa9 100644
--- a/ServerLMS/serverlmswidget.cpp
+++ b/ServerLMS/serverlmswidget.cpp
@@ -122,9 +122,15 @@ void ServerLMSWidget::addToLog(QString message)
void ServerLMSWidget::slot_BlockAutorization(bool block)
{
if(block)
+ {
server->blockAutorization();
+ ui->lblBlockAuth->setPixmap(QPixmap(QStringLiteral(":/resources/icons/lock.png")));
+ }
else
+ {
server->unBlockAutorization();
+ ui->lblBlockAuth->setPixmap(QPixmap(QStringLiteral(":/resources/icons/open.png")));
+ }
}
void ServerLMSWidget::slot_LanguageChanged(QString language)
@@ -153,6 +159,7 @@ void ServerLMSWidget::on_btnStopServer_clicked()
ui->btnStopServer->setEnabled(false);
ui->btnStartServer->setEnabled(true);
ui->lblOnOff->setPixmap(QPixmap(QStringLiteral(":/resources/icons/switchOff.png")));
+ slot_BlockAutorization(false);
}
}
diff --git a/ServerLMS/serverlmswidget.ui b/ServerLMS/serverlmswidget.ui
index 3b14ed6..21d10be 100644
--- a/ServerLMS/serverlmswidget.ui
+++ b/ServerLMS/serverlmswidget.ui
@@ -85,38 +85,6 @@
-
-
-
-
-
-
- 40
- 40
-
-
-
-
-
-
- :/resources/icons/switchOff.png
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
@@ -173,6 +141,80 @@
+ -
+
+
+
+ 40
+ 40
+
+
+
+
+
+
+ :/resources/icons/switchOff.png
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
-
+
+
+ Block Authorization
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 32
+
+
+
+
+ 32
+ 32
+
+
+
+
+
+
+ :/resources/icons/open.png
+
+
+ true
+
+
+
+
+