См. определение в файле converter_to_11.5.0.php строка 12
◆ _buildEdges()
_buildEdges |
( |
& | $errorMessage | ) |
|
|
static |
- Возвращает
- int items processed
An error occured (chapter or course not found in new data model) In old data model, this shouldn't be. So, it's may be: 1) our bug during importing chapter/courses to lessons 2) data inconsistency in target database 3) third-party UPDATE/INSERT/DELETE was processed on lessons/chapters/courses during convertation In any case, this situation is not good (except, probabaly, case #2). But, best we can do is continue convertation. Because, if we restart convertation, it can be infinitly looped.
So, nothing to do here.
См. определение в файле converter_to_11.5.0.php строка 774
◆ _CheckOperationsInDB()
◆ _CheckTasksInDB()
_CheckTasksInDB |
( |
| $arTasksOperations | ) |
|
|
staticprotected |
◆ _CheckTasksOperationsRelations()
_CheckTasksOperationsRelations |
( |
| $arOperationsInDB, |
|
|
| $arTasksInDB, |
|
|
| $arTasksOperations ) |
|
staticprotected |
◆ _CreateEdgeForNodes()
_CreateEdgeForNodes |
( |
| $parentNodeId, |
|
|
| $childNodeId, |
|
|
| $sort ) |
|
static |
◆ _CreateEdgesTbl()
◆ _CreateFieldsInTbls()
◆ _CreateTblRightsAll()
◆ _GetChapterIdInNewDataModel()
_GetChapterIdInNewDataModel |
( |
| $b_learn_chapter_ID | ) |
|
|
static |
- Аргументы
-
int | chapter_id in old data model (in table b_learn_chapter) |
- Возвращает
- int chapter_id in new data model (in table b_learn_lesson) OR -1 on error
См. определение в файле converter_to_11.5.0.php строка 926
◆ _GetCourseIdInNewDataModel()
_GetCourseIdInNewDataModel |
( |
| $b_learn_course_ID | ) |
|
|
static |
- Аргументы
-
int | course_id in old data model (in table b_learn_course) |
- Возвращает
- int course_id in new data model (in table b_learn_lesson) OR -1 on error
См. определение в файле converter_to_11.5.0.php строка 948
◆ _GiveUp()
◆ _IsAlreadyConverted()
We are converted if option with name self::OPTION_ID is set to self::STATUS_INSTALL_COMPLETE
!!! But, if: 1) this option is set to self::STATUS_INSTALL_NEVER_START AND 2) there is tables b_learn_lesson_edges exists & b_learn_rights_all and b_learn_course_permission doesn't exists it means that options is incorrectly set (or was reseted by somebody else), so we returns that DB is already converted
См. определение в файле converter_to_11.5.0.php строка 1218
◆ _MarkLessonAsProcessed()
_MarkLessonAsProcessed |
( |
| $lessonId | ) |
|
|
static |
◆ _processChapters()
◆ _processCourses()
◆ _RemoveOrphanedTables()
_RemoveOrphanedTables |
( |
| ) |
|
|
staticprotected |
◆ _RightsModelCreateOperations()
_RightsModelCreateOperations |
( |
| ) |
|
|
staticprotected |
◆ _RightsModelCreateTasksAndRelation()
_RightsModelCreateTasksAndRelation |
( |
| $arOperationsInDB | ) |
|
|
staticprotected |
◆ _RightsModelGetAllOperations()
_RightsModelGetAllOperations |
( |
| ) |
|
|
staticprotected |
◆ _RightsModelGetTasksWithOperations()
_RightsModelGetTasksWithOperations |
( |
| ) |
|
|
staticprotected |
◆ _RightsModelPurge()
◆ _UnrepeatableCreateLesson()
_UnrepeatableCreateLesson |
( |
| $arFields | ) |
|
|
static |
Inserts new lesson to b_learn_lesson. Before insert, drop exists lessons with such WAS_CHAPTER_ID (if not NULL) or with such WAS_COURSE_ID (if not NULL)
См. определение в файле converter_to_11.5.0.php строка 1163
◆ AddPath()
◆ avoidTimeout()
This function throws exception CLearnInstall201203ConvertDBTimeOut, if it's low time left.
Hmmm... WTF?! Lets think, that our limit is 25 seconds. If it actually less, there is nothing wrong, because current algorithm should be firm to breaks in any place.
We have unlimited time, but some troubles can occur in IIS, so limit time to 20 seconds.
См. определение в файле converter_to_11.5.0.php строка 1037
◆ Commit()
◆ ConvertDB()
ConvertDB |
( |
& | $errorMessage | ) |
|
|
static |
- Возвращает
- int items processed
Our plan: 1) Create lesson for every course and links them (b_learn_course.LINKED_LESSON_ID = id_of_new_lesson). Than update b_learn_course.JOURNAL_STATUS to self::JOURNAL_STATUS_COURSE_LINKED
2) Copy all chapters to lessons table and than update b_learn_chapter.JOURNAL_STATUS = self::JOURNAL_STATUS_CHAPTER_COPIED
3) Build all edges between lessons. Firstly, build edges for simple lessons (not that was a chapter or course), and than for lessons-chapters.
См. определение в файле converter_to_11.5.0.php строка 565
◆ ConvertPermissions()
◆ InitializeNewRightsModel()
InitializeNewRightsModel |
( |
| ) |
|
|
staticprotected |
◆ IsNewRightsModelInitialized()
IsNewRightsModelInitialized |
( |
& | $step, |
|
|
& | $msg ) |
|
staticprotected |
◆ ReCreateTriggersForMSSQL()
ReCreateTriggersForMSSQL |
( |
| ) |
|
|
staticprotected |
◆ Rollback()
◆ run()
◆ StartTransaction()
◆ $items_processed
◆ JOURNAL_STATUS_CHAPTER_COPIED
const JOURNAL_STATUS_CHAPTER_COPIED = 2 |
◆ JOURNAL_STATUS_COURSE_LINKED
const JOURNAL_STATUS_COURSE_LINKED = 1 |
◆ JOURNAL_STATUS_LESSON_EDGES_CREATED
const JOURNAL_STATUS_LESSON_EDGES_CREATED = 3 |
◆ JOURNAL_STATUS_UNPROCESSED
const JOURNAL_STATUS_UNPROCESSED = -1 |
◆ MODULE_ID
const MODULE_ID = 'learning' |
◆ OPTION_ID
const OPTION_ID = '~LearnInstall201203ConvertDB::_IsAlreadyConverted' |
◆ STATUS_INSTALL_COMPLETE
const STATUS_INSTALL_COMPLETE = '1' |
◆ STATUS_INSTALL_INCOMPLETE
const STATUS_INSTALL_INCOMPLETE = '3' |
◆ STATUS_INSTALL_NEVER_START
const STATUS_INSTALL_NEVER_START = '2' |
Объявления и описания членов класса находятся в файле: