Course Document TreeView Display

Third party modules, patches, bugfixes
Post Reply
Msentri
Newbie
Posts: 11
Joined: Wed May 18, 2016 9:02 am
Version: forma.lms 1.4.1

Course Document TreeView Display

Post by Msentri » Tue May 31, 2016 8:34 am

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.

User avatar
alberto
FormaLms Guru
Posts: 911
Joined: Fri Mar 02, 2012 9:18 am
Contact:

Re: Course Document TreeView Display

Post by alberto » Tue May 31, 2016 8:47 am

Hi, the module is here:
appLms\modules\organization\
--------------------------------------------------
Become a CONTRIBUTOR

Support the project for FREE!
www.Elearnit.net

Msentri
Newbie
Posts: 11
Joined: Wed May 18, 2016 9:02 am
Version: forma.lms 1.4.1

Re: Course Document TreeView Display

Post by Msentri » Tue May 31, 2016 9:19 am

function organization_display( &$treeView ) {
// print conainer div and form
require_once($GLOBALS['where_lms'].'/lib/lib.track_user.php');
TrackUser::setActionTrack(getLogUserId(), $_SESSION['idCourse'], 'organization', 'view');

global $modname, $op;
$GLOBALS['page']->setWorkingZone('content');
$GLOBALS['page']->add( '<div class="std_block">' );
$GLOBALS['page']->add( '<form id="orgshow" method="post"'
.' action="index.php?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());
/*
addCss('shadowbox');
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.init(options);
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')."'};
lb.init(Config);"
.'</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 ?

Msentri
Newbie
Posts: 11
Joined: Wed May 18, 2016 9:02 am
Version: forma.lms 1.4.1

Re: Course Document TreeView Display

Post by Msentri » Tue May 31, 2016 11:06 am

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

thanks

luchigno
Newbie
Posts: 1
Joined: Wed Jun 01, 2016 1:17 pm
Version: forma.lms 1.4.1

Re: Course Document TreeView Display

Post by luchigno » Wed Jun 01, 2016 1:31 pm

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.

L.

Msentri
Newbie
Posts: 11
Joined: Wed May 18, 2016 9:02 am
Version: forma.lms 1.4.1

Re: Course Document TreeView Display

Post by Msentri » Thu Jun 02, 2016 7:13 am

Thanks appreciate it

Msentri
Newbie
Posts: 11
Joined: Wed May 18, 2016 9:02 am
Version: forma.lms 1.4.1

Re: Course Document TreeView Display

Post by Msentri » Thu Jun 02, 2016 12:57 pm

is it possible to change treeview div structure to ul structure so that i can do accordion.

please help

Post Reply