__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**
* A collection of utility classes for use with course sections.
*
* @module moodle-course-util
* @submodule moodle-course-util-section
*/
Y.namespace('Moodle.core_course.util.section');
/**
* A collection of utility classes for use with course sections.
*
* @class Moodle.core_course.util.section
* @static
*/
Y.Moodle.core_course.util.section = {
CONSTANTS: {
SECTIONIDPREFIX: 'section-'
},
/**
* Determines the section ID for the provided section.
*
* @method getId
* @param section {Node} The section to find an ID for.
* @return {Number|false} The ID of the section in question or false if no ID was found.
*/
getId: function(section) {
// We perform a simple substitution operation to get the ID.
var id = section.get('id').replace(
this.CONSTANTS.SECTIONIDPREFIX, '');
// Attempt to validate the ID.
id = parseInt(id, 10);
if (typeof id === 'number' && isFinite(id)) {
return id;
}
return false;
}
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| base.js | File | 294 B | 0777 |
|
| cm.js | File | 2.04 KB | 0777 |
|
| section.js | File | 1.04 KB | 0777 |
|