Merge branch 'wip-mdl-37329-new' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Damyon Wiese 2013-02-20 08:54:57 +08:00
commit cfd2addf3f
3 changed files with 41 additions and 19 deletions

View file

@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013020800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'block_navigation'; // Full name of the plugin (used for diagnostics)

View file

@ -86,6 +86,8 @@ var NODETYPE = {
SYSTEM : 1,
/** @type int Course category = 10 */
CATEGORY : 10,
/** @type int MYCATEGORY = 11 */
MYCATEGORY : 11,
/** @type int Course = 20 */
COURSE : 20,
/** @type int Course section = 30 */
@ -454,7 +456,8 @@ BRANCH.prototype = {
this.addChild(object.children[i]);
}
}
if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE) && coursecount >= M.block_navigation.courselimit) {
if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE || this.get('type') == NODETYPE.MYCATEGORY)
&& coursecount >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(this);
}
this.get('tree').toggleExpansion({target:this.node});
@ -486,7 +489,8 @@ BRANCH.prototype = {
branch.addChild(children[i]);
}
}
if (branch.get('type') == NODETYPE.CATEGORY && count >= M.block_navigation.courselimit) {
if ((branch.get('type') == NODETYPE.CATEGORY || branch.get('type') == NODETYPE.MYCATEGORY)
&& count >= M.block_navigation.courselimit) {
this.addViewAllCoursesChild(branch);
}
}