Merge branch 'add-versionController' into merge-task-and-verController

# Conflicts:
#	InstructorsAndTrainees/CMakeLists.txt
#	InstructorsAndTrainees/connectorToServer/Core/recognizesystem.h
#	InstructorsAndTrainees/instructorsandtraineeswidget.cpp
#	ServerLMS/Systems/updatecontroller.cpp
#	ServerLMS/Systems/updatecontroller.h
This commit is contained in:
semenov
2025-01-21 15:52:20 +03:00
50 changed files with 1770 additions and 192 deletions

View File

@@ -11,11 +11,16 @@ ProcessingSystem::ProcessingSystem(ProviderDBLMS* providerDBLMS, UpdateControlle
this->updateController = updateController;
}
void ProcessingSystem::initialize(ServerLMSWidget *server, DataParser *dataParser, CommonClientHandler *commonClientHandler,Logger *logger)
void ProcessingSystem::initialize(ServerLMSWidget *server,
DataParser *dataParser,
CommonClientHandler *commonClientHandler,
Logger *logger,
UpdateController *updateController)
{
this->commonClientServer = commonClientHandler;
this->dataParser = dataParser;
this->server = server;
this->updateController = updateController;
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
@@ -303,6 +308,18 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
{
client->sendVersionList();
}
else if(clientNotify.Code == commandCanChangeVersion)
{
if (updateController->getCurrentVersion()->getIsChangeable())
{
client->sigSendNotify(commandChangable);
}
else
{
client->sigSendNotify(commandUnchangable);
}
}
}