The Elearning Community • Course Document TreeView Display
Page 1 of 1

Course Document TreeView Display

Posted: Tue May 31, 2016 8:34 am
by Msentri
Hi i would like to know what is the file that process and structure Course document treeview, where is it located i wanna Customise it.

i have been trying to find it i can not set it thanks.

Re: Course Document TreeView Display

Posted: Tue May 31, 2016 8:47 am
by alberto
Hi, the module is here:

Re: Course Document TreeView Display

Posted: Tue May 31, 2016 9:19 am
by Msentri
function organization_display( &$treeView ) {
// print conainer div and form
TrackUser::setActionTrack(getLogUserId(), $_SESSION['idCourse'], 'organization', 'view');

global $modname, $op;
$GLOBALS['page']->add( '<div class="std_block">' );
$GLOBALS['page']->add( '<form id="orgshow" method="post"'
.' action="/?modname='.$modname.'&op='.$op.'"'
.' >'."\n"
.'<input type="hidden" id="authentic_request_org" name="authentic_request" value="'.Util::getSignature().'" />');

if( funAccess('moditem','MOD', TRUE, 'organization' ) ) {
$treeView->withActions = TRUE;
} else {
$tdb = $treeView->getTreeDb();

$GLOBALS['page']->add( $treeView->load());

if( funAccess('moditem','MOD', TRUE, 'organization' ) ) {
$GLOBALS['page']->add( $treeView->loadActions() );

$GLOBALS['page']->add( '</form>' );
// print form for import action
$GLOBALS['page']->add( '</div>' );

YuiLib::load(array(), array());
Util::get_js(Get::rel_path('base').'/addons/shadowbox/shadowbox-yui.js', true, true);
Util::get_js(Get::rel_path('base').'/addons/shadowbox/shadowbox.js', true, true);

$GLOBALS['page']->add( ''
.'<script type="text/javascript">
YAHOO.util.Event.onDOMReady(function() {
var options = { listenOverlay:false, overlayOpacity:"0.8",
loadingImage:"'.getPathImage('lms').'standard/loading.gif", overlayBgImage:"'.getPathImage('lms').'standard/overlay-85.png",
text: {close: "'. Lang::t('_CLOSE').'", cancel: "'. Lang::t('_UNDO').'", loading:"'. Lang::t('_LOADING').'" },
onOpen: function (gallery) { window.onbeforeunload = function() { return "'. Lang::t('_CONFIRM').'"; } }
Shadowbox.close = function() {
window.onbeforeunload = null;
window.frames[\'shadowbox_content\'].uiPlayer.closePlayer(true, window);
</script>' );
$GLOBALS['page']->add( '<script type="text/javascript">'
."var lb = new LightBox();
var Config = {};
Config.langs = {_CLOSE: '".Lang::t('_CLOSE', 'standard')."'};
.'</script>' );

i see on the function above that you process form.

with this function $GLOBALS['page']->add( $treeView->load()); - you created treeview object of which display the output is this a correct class found on lib lib.treeview.php ?

Re: Course Document TreeView Display

Posted: Tue May 31, 2016 11:06 am
by Msentri
i wanna confirm if load() function is being called form $treeView

because on function organization_display( &$treeView ) is see this line of code :

$GLOBALS['page']->add( $treeView->load());

if which displays the content to a browser , if i go to lib.treeview.php i get the function load() within it i get the build up of treeview structure
where the are DIV and classes attributes.

what i wanna change is TreeViewContainer class and add my custom class please help. because i have tried changing it but still load the old class of which is TreeViewContainer


Re: Course Document TreeView Display

Posted: Wed Jun 01, 2016 1:31 pm
by luchigno
Hi, the module that makes up the tree of learnig object is "organization."
The tree will be loaded from the "load function ()" in "appLms/modules/organization/orglib.php" .

all information is placed in a stack, which is passed in turn to printElement () function.


Re: Course Document TreeView Display

Posted: Thu Jun 02, 2016 7:13 am
by Msentri
Thanks appreciate it

Re: Course Document TreeView Display

Posted: Thu Jun 02, 2016 12:57 pm
by Msentri
is it possible to change treeview div structure to ul structure so that i can do accordion.

please help

This site uses cookies.

Some of the cookies we use are essential for parts of the site to operate and have already been set. We also use Google Analytics scripts, which all use cookies.
You may delete or block all cookies from this site in your browser options.