Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 89... Línea 89...
89
        const cms = this.getElements(this.selectors.CM);
89
        const cms = this.getElements(this.selectors.CM);
90
        cms.forEach((cm) => {
90
        cms.forEach((cm) => {
91
            this.cms[cm.dataset.id] = cm;
91
            this.cms[cm.dataset.id] = cm;
92
        });
92
        });
Línea 93... Línea 93...
93
 
93
 
94
        // Set the page item if any.
94
        this._expandPageCmSectionIfNecessary(state);
Línea 95... Línea 95...
95
        this._refreshPageItem({element: state.course, state});
95
        this._refreshPageItem({element: state.course, state});
96
 
96
 
97
        // Configure Aria Tree.
97
        // Configure Aria Tree.
Línea 218... Línea 218...
218
            );
218
            );
219
        }
219
        }
220
    }
220
    }
Línea 221... Línea 221...
221
 
221
 
-
 
222
    /**
-
 
223
     * Expand a section if the current page is a section's cm.
-
 
224
     *
-
 
225
     * @private
-
 
226
     * @param {Object} state the course state.
-
 
227
     */
-
 
228
    _expandPageCmSectionIfNecessary(state) {
-
 
229
        const pageCmInfo = this.reactive.getPageAnchorCmInfo();
-
 
230
        if (!pageCmInfo) {
-
 
231
            return;
-
 
232
        }
-
 
233
        this._expandSectionNode(state.section.get(pageCmInfo.sectionid), true);
-
 
234
    }
-
 
235
 
222
    /**
236
    /**
223
     * Create a newcm instance.
237
     * Create a newcm instance.
224
     *
238
     *
225
     * @param {object} param
239
     * @param {object} param
226
     * @param {Object} param.state
240
     * @param {Object} param.state