edx-modulestore
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -200,3 +200,3 @@ 'use strict'; | ||
function (v) { | ||
return !!v; | ||
return v !== undefined; | ||
} | ||
@@ -203,0 +203,0 @@ ); |
@@ -319,2 +319,54 @@ 'use strict'; | ||
} | ||
}, | ||
wikiEnabled: { | ||
get: function () { | ||
return this._get('metadata.tabs').some(function (tab) { | ||
return tab.type === 'wiki'; | ||
}); | ||
}, | ||
set: function (value) { | ||
var tabs = this._get('metadata.tabs'); | ||
var enabled = tabs.some(function (tab) { | ||
return tab.type === 'wiki'; | ||
}); | ||
if (value && !enabled) { | ||
tabs.push({ | ||
type: 'wiki', | ||
name: 'Wiki' | ||
}); | ||
} | ||
else if (!value) { | ||
this._set('metadata.tabs', tabs.filter(function (tab) { | ||
return tab.type !== 'wiki'; | ||
})); | ||
} | ||
} | ||
}, | ||
forumEnabled: { | ||
get: function () { | ||
return this._get('metadata.tabs').some(function (tab) { | ||
return tab.type === 'discussion'; | ||
}); | ||
}, | ||
set: function (value) { | ||
var tabs = this._get('metadata.tabs'); | ||
var enabled = tabs.some(function (tab) { | ||
return tab.type === 'discussion'; | ||
}); | ||
if (value && !enabled) { | ||
tabs.push({ | ||
type: 'discussion', | ||
name: 'Forum' | ||
}); | ||
} | ||
else if (!value) { | ||
this._set('metadata.tabs', tabs.filter(function (tab) { | ||
return tab.type !== 'discussion'; | ||
})); | ||
} | ||
} | ||
} | ||
@@ -321,0 +373,0 @@ }, |
{ | ||
"name": "edx-modulestore", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Easy browsing of Open edX modulestores", | ||
@@ -5,0 +5,0 @@ "author": "Bertrand Marron", |
# edx-modulestore | ||
[![Build Status](https://secure.travis-ci.org/IONISx/edx-modulestore.svg?branch=master)](https://travis-ci.org/IONISx/edx-modulestore) | ||
[![Build Status](https://circleci.com/gh/IONISx/edx-modulestore.svg?style=svg)](https://circleci.com/gh/IONISx/edx-modulestore) | ||
[![Dependencies Status](https://david-dm.org/IONISx/edx-modulestore.svg)](https://david-dm.org/IONISx/edx-modulestore) | ||
@@ -5,0 +5,0 @@ [![Dev Dependencies Status](https://david-dm.org/IONISx/edx-modulestore/dev-status.svg)](https://david-dm.org/IONISx/edx-modulestore#info=devDependencies) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42324
1254