feat(deployed): add TF Learn 1.7.5 (no-source, vetted live)
TF Learn (Tech Fry) + techfry library 1.3.4; login-gated, no repo -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
parent
1097812b20
commit
bb1c28ae0c
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<access component="com_tflearn">
|
||||||
|
<section name="component">
|
||||||
|
<action name="core.admin" title="JACTION_ADMIN" />
|
||||||
|
<action name="core.options" title="JACTION_OPTIONS" />
|
||||||
|
<action name="core.manage" title="JACTION_MANAGE" />
|
||||||
|
<action name="core.create" title="JACTION_CREATE" />
|
||||||
|
<action name="core.delete" title="JACTION_DELETE" />
|
||||||
|
<action name="core.edit" title="JACTION_EDIT" />
|
||||||
|
<action name="core.edit.state" title="JACTION_EDITSTATE" />
|
||||||
|
</section>
|
||||||
|
</access>
|
||||||
245
deployed/tflearn/administrator/components/com_tflearn/config.xml
Normal file
245
deployed/tflearn/administrator/components/com_tflearn/config.xml
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
|
||||||
|
<fieldset name="general" label="COM_TF_GENERAL" description="COM_TF_CONFIG_GENERAL_DESC">
|
||||||
|
|
||||||
|
<field name="is_pro" type="radio" label="Pro Version" layout="joomla.form.field.radio.switcher" default="0" readonly="true">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="load_rs" type="list" label="Load Resources" multiple="true" layout="joomla.form.field.list-fancy-select">
|
||||||
|
<option value="bs_css">Bootstrap CSS</option>
|
||||||
|
<option value="bs_js">Bootstrap JS</option>
|
||||||
|
<option value="air_grid_css">Air Grid CSS</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="enable_completion" type="radio" label="Enable Completion" layout="joomla.form.field.radio.switcher" default="1">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="record_hits" type="radio" label="JGLOBAL_RECORD_HITS_LABEL" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="enable_sd" type="radio" label="Enable Structured Data" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="provider" type="text" label="Course Provider" showon="enable_sd:1"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="courses" label="COM_TFLEARN_COURSES" description="COM_TFLEARN_CONFIG_COURSES_DESC">
|
||||||
|
|
||||||
|
<field name="courses_access" type="accesslevel" label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" default="1"/>
|
||||||
|
|
||||||
|
<field name="courses_order_col" type="list" label="COM_TF_ORDER_COLUMN" default="id">
|
||||||
|
<option value="id">id</option>
|
||||||
|
<option value="title">title</option>
|
||||||
|
<option value="created">created</option>
|
||||||
|
<option value="modified">modified</option>
|
||||||
|
<option value="ordering">ordering</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="courses_order_dirn" type="list" label="COM_TF_ORDER_DIRECTION" default="DESC">
|
||||||
|
<option value="DESC">JGLOBAL_ORDER_DESCENDING</option>
|
||||||
|
<option value="ASC">JGLOBAL_ORDER_ASCENDING</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="show_feed_link" type="radio" layout="joomla.form.field.radio.switcher" default="0" label="JGLOBAL_SHOW_FEED_LINK_LABEL" description="JGLOBAL_SHOW_FEED_LINK_DESC">
|
||||||
|
<option value="0">JHIDE</option>
|
||||||
|
<option value="1">JSHOW</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_courses_styles" type="note" label="Styles"/>
|
||||||
|
|
||||||
|
<field name="courses_title_class" type="text" label="Courses Title Class" description="Example: text-primary"/>
|
||||||
|
|
||||||
|
<field name="courses_item_class" type="text" label="Courses Item Class" description="Example: shadow"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="course" label="COM_TFLEARN_COURSE" description="COM_TFLEARN_CONFIG_COURSE_DESC">
|
||||||
|
|
||||||
|
<field name="course_layout" type="list" label="COM_TF_LAYOUT" default="plain">
|
||||||
|
<option value="plain">COM_TF_PLAIN</option>
|
||||||
|
<option value="accordion">COM_TF_ACCORDION</option>
|
||||||
|
<option value="tabs">COM_TF_TABS</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="course_show_image" type="radio" label="COM_TF_IMAGE" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JHIDE</option>
|
||||||
|
<option value="1">JSHOW</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="auto_description" type="list" label="Auto Description" description="Generate lesson description automatically based on content" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">Semicolon Separated</option>
|
||||||
|
<option value="2">Unordered List</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="enrol_url" type="url" label="Enrol URL"/>
|
||||||
|
|
||||||
|
<field name="enrol_button_location" type="list" label="Enrol Button Location" default="3">
|
||||||
|
<option value="0">JNONE</option>
|
||||||
|
<option value="1">Top</option>
|
||||||
|
<option value="2">Bottom</option>
|
||||||
|
<option value="3">Top and Bottom</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_course_styles" type="note" label="Styles"/>
|
||||||
|
|
||||||
|
<field name="course_button_class" type="text" label="Enrol Button Class" description="Example: btn btn-primary my-2"/>
|
||||||
|
|
||||||
|
<field name="course_modtitle_class" type="text" label="Module Title Class" description="Example: bg-primary text-white p-2 rounded my-2"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="paths" label="COM_TFLEARN_PATHS" description="COM_TFLEARN_CONFIG_PATHS_DESC">
|
||||||
|
|
||||||
|
<field name="no_course_msg" type="textarea" label="No Course Message" description="Message displayed when user is not enrolled in any course." default="You are not enrolled in any course." filter="raw"/>
|
||||||
|
|
||||||
|
<field name="paths_order_col" type="list" label="COM_TF_ORDER_COLUMN" default="id">
|
||||||
|
<option value="id">id</option>
|
||||||
|
<option value="title">title</option>
|
||||||
|
<option value="created">created</option>
|
||||||
|
<option value="modified">modified</option>
|
||||||
|
<option value="ordering">ordering</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="paths_order_dirn" type="list" label="COM_TF_ORDER_DIRECTION" default="DESC">
|
||||||
|
<option value="DESC">JGLOBAL_ORDER_DESCENDING</option>
|
||||||
|
<option value="ASC">JGLOBAL_ORDER_ASCENDING</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_paths_styles" type="note" label="Styles"/>
|
||||||
|
|
||||||
|
<field name="single_path_class" type="text" default="border rounded my-3 p-3" label="Single Path Class"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="path" label="COM_TFLEARN_PATH" description="COM_TFLEARN_CONFIG_PATH_DESC">
|
||||||
|
|
||||||
|
<field name="path_layout" type="list" label="COM_TF_LAYOUT" default="plain">
|
||||||
|
<option value="plain">COM_TF_PLAIN</option>
|
||||||
|
<option value="accordion">COM_TF_ACCORDION</option>
|
||||||
|
<option value="tabs">COM_TF_TABS</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="lessons_order_col" type="list" label="Lesson Order Column" default="ordering">
|
||||||
|
<option value="id">id</option>
|
||||||
|
<option value="title">title</option>
|
||||||
|
<option value="created">created</option>
|
||||||
|
<option value="modified">modified</option>
|
||||||
|
<option value="ordering">ordering</option>
|
||||||
|
<option value="hits">hits</option>
|
||||||
|
<option value="ref">ref</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="lessons_order_dirn" type="list" label="Lesson Order Direction" default="ASC">
|
||||||
|
<option value="DESC">JGLOBAL_ORDER_DESCENDING</option>
|
||||||
|
<option value="ASC">JGLOBAL_ORDER_ASCENDING</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_path_styles" type="note" label="Styles"/>
|
||||||
|
|
||||||
|
<field name="module_title_class" type="text" default="bg-primary text-white p-2 mb-3" label="Module Title Class"/>
|
||||||
|
|
||||||
|
<field name="score_btn_class" type="text" default="bg-info text-white" label="Score Button Class"/>
|
||||||
|
|
||||||
|
<field name="test_btn_class" type="text" default="bg-success text-white" label="Test Button Class"/>
|
||||||
|
|
||||||
|
<field name="complete_btn_class" type="text" default="bg-light text-success" label="Complete Button Class"/>
|
||||||
|
|
||||||
|
<field name="incomplete_btn_class" type="text" default="bg-light text-dark" label="Incomplete Button Class"/>
|
||||||
|
|
||||||
|
<field name="path_progress_bar_class" type="text" default="bg-success text-white" label="Progress Bar Class"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="page" label="COM_TFLEARN_PAGE" description="COM_TFLEARN_CONFIG_PAGE_DESC">
|
||||||
|
|
||||||
|
<field name="prepare_content" type="radio" label="Prepare Content" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="show_all_pages" type="radio" label="Show All Pages Button" layout="joomla.form.field.radio.switcher" default="1">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="show_nav" type="radio" label="Show Navigation" layout="joomla.form.field.radio.switcher" default="1">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_page_styles" type="note" label="Styles"/>
|
||||||
|
|
||||||
|
<field name="page_title_class" type="text" default="fw-bold" label="Page Title Class"/>
|
||||||
|
|
||||||
|
<field name="article_title_class" type="text" default="text-info" label="Article Title Class"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="test" label="COM_TFLEARN_TEST" description="COM_TFLEARN_CONFIG_TEST_DESC">
|
||||||
|
|
||||||
|
<field name="show_captcha" type="radio" label="COM_TFLEARN_SHOW_CAPTCHA" layout="joomla.form.field.radio.switcher" default="0" filter="integer">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="custom_redirect" type="url" label="CON_TFLEARN_CUSTOM_REDIRECT"/>
|
||||||
|
|
||||||
|
<field name="custom_message" type="text" default="Thank You!" label="CON_TFLEARN_CUSTOM_MESSAGE"/>
|
||||||
|
|
||||||
|
<field name="note_test_button" type="note" label="COM_TF_BUTTON"/>
|
||||||
|
|
||||||
|
<field name="test_button" type="subform" formsource="libraries/techfry/forms/button.xml" label="COM_TF_BUTTON" hiddenLabel="true"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="notify" label="COM_TF_NOTIFY" description="COM_TF_CONFIG_NOTIFY_DESC">
|
||||||
|
|
||||||
|
<field name="note_notify_admin" type="note" label="Notify Admin"/>
|
||||||
|
|
||||||
|
<field name="notify_admin_enrol" type="radio" label="Enrollment" layout="joomla.form.field.radio.switcher" default="1">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="notify_admin_test" type="radio" label="Test" layout="joomla.form.field.radio.switcher" default="1">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="note_notify_user" type="note" label="Notify User"/>
|
||||||
|
|
||||||
|
<field name="notify_user_enrol" type="radio" label="Enrollment" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="notify_enrol_mail_id" type="number" label="Mail ID" default="0" showon="notify_user_enrol:1"/>
|
||||||
|
|
||||||
|
<field name="notify_user_test" type="radio" label="Test" layout="joomla.form.field.radio.switcher" default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="notify_test_mail_id" type="number" label="Mail ID" default="0" showon="notify_user_test:1"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC">
|
||||||
|
|
||||||
|
<field name="rules" type="rules" label="JCONFIG_PERMISSIONS_LABEL" validate="rules" filter="rules" component="com_tflearn" section="component"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</config>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
|
||||||
|
<fieldset name="general">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson_id"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_LESSON"
|
||||||
|
query="SELECT id, title FROM #__tfl_lessons WHERE published=1"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
required="true"
|
||||||
|
layout="joomla.form.field.list-fancy-select">
|
||||||
|
<option value="">COM_TF_SELECT</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="user_id"
|
||||||
|
type="user"
|
||||||
|
label="COM_TF_USER"
|
||||||
|
required="true"/>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="complete"
|
||||||
|
type="radio"
|
||||||
|
label="Complete"
|
||||||
|
default="0"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
size="1"
|
||||||
|
filter="intval">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="description">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="group_id"
|
||||||
|
type="usergrouplist"
|
||||||
|
label="COM_TFLEARN_USER_GROUP"
|
||||||
|
default="2" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="course_type"
|
||||||
|
type="text"
|
||||||
|
label="COM_TF_TYPE" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="short_desc"
|
||||||
|
type="textarea"
|
||||||
|
label="COM_TFLEARN_SHORT_DESC" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="front"
|
||||||
|
type="radio"
|
||||||
|
label="COM_TFLEARN_FRONT"
|
||||||
|
default="1"
|
||||||
|
layout="joomla.form.field.radio.switcher">
|
||||||
|
<option value="0">JHIDE</option>
|
||||||
|
<option value="1">JSHOW</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="enrol"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_ENROLMENT"
|
||||||
|
default="none">
|
||||||
|
<option value="none">None</option>
|
||||||
|
<option value="self">Self</option>
|
||||||
|
<option value="external">External</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="enrol_link"
|
||||||
|
type="url"
|
||||||
|
label="COM_TFLEARN_LINK"
|
||||||
|
showon="enrol:external" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="modulesinfo" label="COM_TFLEARN_MODULES">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="modules"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_modules.xml"
|
||||||
|
label="COM_TFLEARN_MODULES"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable"
|
||||||
|
filter="raw" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="imageinfo" label="COM_TFLEARN_IMAGE">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="image"
|
||||||
|
type="media"
|
||||||
|
label="COM_TFLEARN_IMAGE" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="user"
|
||||||
|
type="sql"
|
||||||
|
query="SELECT DISTINCT a.user_id, b.name FROM #__tfl_completion AS a LEFT JOIN #__users AS b ON a.user_id=b.id"
|
||||||
|
key_field="user_id"
|
||||||
|
value_field="name"
|
||||||
|
header="- Select User -"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
onchange="this.form.submit();">
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson"
|
||||||
|
type="sql"
|
||||||
|
query="SELECT DISTINCT a.lesson_id, b.title FROM #__tfl_completion AS a LEFT JOIN #__tfl_lessons AS b ON a.lesson_id=b.id"
|
||||||
|
key_field="lesson_id"
|
||||||
|
value_field="title"
|
||||||
|
header="- Select Lesson -"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
onchange="this.form.submit();">
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
<option value="course ASC">COM_TFLEARN_COURSE_ASC</option>
|
||||||
|
<option value="course DESC">COM_TFLEARN_COURSE_DESC</option>
|
||||||
|
<option value="name ASC">COM_TFLEARN_USER_ASC</option>
|
||||||
|
<option value="name DESC">COM_TFLEARN_USER_DESC</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="ordering ASC">COM_TFLEARN_ORDERING_ASC</option>
|
||||||
|
<option value="ordering DESC">COM_TFLEARN_ORDERING_DESC</option>
|
||||||
|
<option value="title ASC">COM_TFLEARN_TITLE_ASC</option>
|
||||||
|
<option value="title DESC">COM_TFLEARN_TITLE_DESC</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
<option value="course_type ASC">COM_TFLEARN_TYPE_ASC</option>
|
||||||
|
<option value="course_type DESC">COM_TFLEARN_TYPE_DESC</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="module"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_MODULE"
|
||||||
|
query="SELECT id, title FROM #__tfl_modules"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
header="- Select Module -"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
onchange="this.form.submit();" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson_type"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_TYPE"
|
||||||
|
onchange="this.form.submit();">
|
||||||
|
<option value="">- Select Lesson Type -</option>
|
||||||
|
<option value="single">Single Page</option>
|
||||||
|
<option value="multi">Multiple Pages</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="completion_type"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_COMPLETION_TYPE"
|
||||||
|
onchange="this.form.submit();">
|
||||||
|
<option value="">- Select Completion Type -</option>
|
||||||
|
<option value="disabled">Disabled</option>
|
||||||
|
<option value="self">Self</option>
|
||||||
|
<option value="view">View</option>
|
||||||
|
<option value="score">Score</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="ordering ASC">COM_TFLEARN_ORDERING_ASC</option>
|
||||||
|
<option value="ordering DESC">COM_TFLEARN_ORDERING_DESC</option>
|
||||||
|
<option value="title ASC">COM_TFLEARN_TITLE_ASC</option>
|
||||||
|
<option value="title DESC">COM_TFLEARN_TITLE_DESC</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
<option value="lesson_type ASC">COM_TFLEARN_TYPE_ASC</option>
|
||||||
|
<option value="lesson_type DESC">COM_TFLEARN_TYPE_DESC</option>
|
||||||
|
<option value="mod_name ASC">COM_TFLEARN_MODULE_ASC</option>
|
||||||
|
<option value="mod_name DESC">COM_TFLEARN_MODULE_DESC</option>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="title ASC">COM_TFLEARN_TITLE_ASC</option>
|
||||||
|
<option value="title DESC">COM_TFLEARN_TITLE_DESC</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_LESSON"
|
||||||
|
query="SELECT id, title FROM #__tfl_lessons"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
header="- Select Lesson -"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
onchange="this.form.submit();" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="q_type"
|
||||||
|
type="list"
|
||||||
|
label="COM_TF_TYPE"
|
||||||
|
default=""
|
||||||
|
onchange="this.form.submit();">
|
||||||
|
<option value="">- Select Type -</option>
|
||||||
|
<option value="1">Multiple Choice - Single</option>
|
||||||
|
<option value="2">Multiple Choice - Multi</option>
|
||||||
|
<option value="3">Numerical</option>
|
||||||
|
<option value="4">Short Answer</option>
|
||||||
|
<option value="5">Matching</option>
|
||||||
|
<option value="6">True False</option>
|
||||||
|
<option value="7">Description</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="ordering ASC">COM_TFLEARN_ORDERING_ASC</option>
|
||||||
|
<option value="ordering DESC">COM_TFLEARN_ORDERING_DESC</option>
|
||||||
|
<option value="title ASC">COM_TFLEARN_TITLE_ASC</option>
|
||||||
|
<option value="title DESC">COM_TFLEARN_TITLE_DESC</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
<option value="lesson_type ASC">COM_TFLEARN_TYPE_ASC</option>
|
||||||
|
<option value="lesson_type DESC">COM_TFLEARN_TYPE_DESC</option>
|
||||||
|
<option value="lesson ASC">COM_TFLEARN_LESSON_ASC</option>
|
||||||
|
<option value="lesson DESC">COM_TFLEARN_LESSON_DESC</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="filter">
|
||||||
|
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
|
||||||
|
<fields name="list">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="COM_TFLEARN_LIST_FULL_ORDERING"
|
||||||
|
description="COM_TFLEARN_LIST_FULL_ORDERING_DESC"
|
||||||
|
onchange="this.form.submit();"
|
||||||
|
default="id DESC">
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
<option value="published ASC">COM_TFLEARN_PUBLISHED_ASC</option>
|
||||||
|
<option value="published DESC">COM_TFLEARN_PUBLISHED_DESC</option>
|
||||||
|
<option value="lesson ASC">COM_TFLEARN_LESSON_ASC</option>
|
||||||
|
<option value="lesson DESC">COM_TFLEARN_LESSON_DESC</option>
|
||||||
|
<option value="name ASC">COM_TFLEARN_USER_ASC</option>
|
||||||
|
<option value="name DESC">COM_TFLEARN_USER_DESC</option>
|
||||||
|
<option value="created ASC">COM_TFLEARN_CREATED_ASC</option>
|
||||||
|
<option value="created DESC">COM_TFLEARN_CREATED_DESC</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,161 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="description">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="module"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_MODULE"
|
||||||
|
required="true"
|
||||||
|
query="SELECT id, title FROM #__tfl_modules WHERE published=1"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
layout="joomla.form.field.list-fancy-select">
|
||||||
|
<option value="">COM_TF_SELECT</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="ref"
|
||||||
|
type="text"
|
||||||
|
label="Reference" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="short_desc"
|
||||||
|
type="textarea"
|
||||||
|
label="COM_TFLEARN_SHORT_DESC" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="lessoninfo" label="JGLOBAL_FIELDSET_OPTIONS">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson_type"
|
||||||
|
type="list"
|
||||||
|
label="COM_TF_TYPE">
|
||||||
|
<option value="single">Single Page</option>
|
||||||
|
<option value="multi">Multiple Pages</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="completion_type"
|
||||||
|
type="list"
|
||||||
|
default="self"
|
||||||
|
label="COM_TFLEARN_COMPLETION_TYPE">
|
||||||
|
<option value="disabled">Disabled</option>
|
||||||
|
<option value="self">Self</option>
|
||||||
|
<option value="view">View</option>
|
||||||
|
<option value="score">Score</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="pass_percent"
|
||||||
|
type="number"
|
||||||
|
label="COM_TFLEARN_PERCENT"
|
||||||
|
default="0"
|
||||||
|
min="0"
|
||||||
|
max="100"
|
||||||
|
showon="completion_type:score" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="contents" label="COM_TFLEARN_CONTENT">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="content_source"
|
||||||
|
type="list"
|
||||||
|
label="Content Source"
|
||||||
|
default="joomla">
|
||||||
|
<option value="joomla">Joomla Articles</option>
|
||||||
|
<option value="pages">Pages</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="jids"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_content.xml"
|
||||||
|
label="COM_TFLEARN_CONTENT_IDS"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
|
filter="raw" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="resources" label="COM_TFLEARN_RESOURCES">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="resources"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_resources.xml"
|
||||||
|
label="COM_TFLEARN_RESOURCES"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
|
filter="raw" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="questions" label="COM_TFLEARN_QUESTIONS">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="questions"
|
||||||
|
type="number"
|
||||||
|
label="COM_TFLEARN_QUESTIONS"
|
||||||
|
default="0"
|
||||||
|
min="0"
|
||||||
|
description="Number of questions for the test. Enter 0 to disable" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="marks"
|
||||||
|
type="number"
|
||||||
|
label="COM_TFLEARN_MARKS"
|
||||||
|
default="3"
|
||||||
|
min="0"
|
||||||
|
description="Marks per question"
|
||||||
|
showon="questions!:0" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="multiple_attempts"
|
||||||
|
type="radio"
|
||||||
|
label="COM_TFLEARN_MULTIPLE_ATTEMPTS"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
default="1"
|
||||||
|
showon="questions!:0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="grade_type"
|
||||||
|
type="list"
|
||||||
|
default="self"
|
||||||
|
label="COM_TFLEARN_GRADE_TYPE"
|
||||||
|
showon="questions!:0[AND]multiple_attempts:1">
|
||||||
|
<option value="recent">Recent Score</option>
|
||||||
|
<option value="average">Average Score</option>
|
||||||
|
<option value="maximum">Maximum Score</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="attempt_gap"
|
||||||
|
type="number"
|
||||||
|
label="COM_TFLEARN_ATTEMPT_GAP"
|
||||||
|
description="Number of days after next attempt is allowed"
|
||||||
|
default="0"
|
||||||
|
showon="questions!:0[AND]multiple_attempts:1" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="description">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="description">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="ref"
|
||||||
|
type="text"
|
||||||
|
label="Reference" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="description">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="lesson_id"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_LESSON"
|
||||||
|
required="true"
|
||||||
|
query="SELECT id, title FROM #__tfl_lessons WHERE published=1"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
layout="joomla.form.field.list-fancy-select">
|
||||||
|
<option value="">COM_TF_SELECT</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="q_type"
|
||||||
|
type="list"
|
||||||
|
label="COM_TF_TYPE"
|
||||||
|
default="1">
|
||||||
|
<option value="1">Multiple Choice - Single</option>
|
||||||
|
<option value="2">Multiple Choice - Multi</option>
|
||||||
|
<option value="3">Numerical</option>
|
||||||
|
<option value="4">Short Answer</option>
|
||||||
|
<option value="5">Matching</option>
|
||||||
|
<option value="6">True False</option>
|
||||||
|
<option value="7">Description</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="depend"
|
||||||
|
type="radio"
|
||||||
|
label="COM_TFLEARN_DEPEND"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
default="0">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="questioninfo">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="options"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_options.xml"
|
||||||
|
label="JOPTIONS"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
|
filter="raw"
|
||||||
|
showon="q_type:1[OR]q_type:2" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="matching"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_matching.xml"
|
||||||
|
label="JOPTIONS"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
|
filter="raw"
|
||||||
|
showon="q_type:5" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="quests"
|
||||||
|
type="subform"
|
||||||
|
formsource="administrator/components/com_tflearn/forms/subform_questions.xml"
|
||||||
|
label="JOPTIONS"
|
||||||
|
hiddenLabel="true"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.subform.repeatable-table"
|
||||||
|
filter="raw"
|
||||||
|
showon="q_type:7" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="answerinfo">
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="answer"
|
||||||
|
type="text"
|
||||||
|
label="COM_TFLEARN_ANSWER"
|
||||||
|
showon="q_type:3[OR]q_type:4[OR]q_type:6" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="explanation"
|
||||||
|
type="textarea"
|
||||||
|
rows="5"
|
||||||
|
label="COM_TFLEARN_EXPLANATION" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<config>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
</config>
|
||||||
|
<fieldset name="general">
|
||||||
|
<field
|
||||||
|
name="lesson_id"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_LESSON"
|
||||||
|
query="SELECT id, title FROM #__tfl_lessons WHERE published=1"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
required="true"
|
||||||
|
readonly="true">
|
||||||
|
<option value="">- Select Course -</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="created_by"
|
||||||
|
type="sql"
|
||||||
|
label="COM_TFLEARN_USER"
|
||||||
|
query="SELECT id, name FROM #__users"
|
||||||
|
key_field="id"
|
||||||
|
value_field="name"
|
||||||
|
required="true"
|
||||||
|
readonly="true">
|
||||||
|
<option value="">- Select User -</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="grade"
|
||||||
|
type="text"
|
||||||
|
label="COM_TFLEARN_GRADE"
|
||||||
|
readonly="true" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="options">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset name="details" label="JDETAILS">
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="content_id"
|
||||||
|
label="COM_TFLEARN_CONTENT_ID"
|
||||||
|
type="number"
|
||||||
|
min="0" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="show_title"
|
||||||
|
type="radio"
|
||||||
|
label="COM_TFLEARN_SHOW_TITLE"
|
||||||
|
default="1"
|
||||||
|
layout="joomla.form.field.radio.switcher">
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="col_a"
|
||||||
|
label="COM_TFLEARN_COLUMN_A"
|
||||||
|
type="text" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="col_b"
|
||||||
|
label="COM_TFLEARN_COLUMN_B"
|
||||||
|
type="text" />
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="module_id"
|
||||||
|
label="COM_TFLEARN_MODULE"
|
||||||
|
type="sql"
|
||||||
|
header="COM_TF_SELECT"
|
||||||
|
query="SELECT id, title FROM #__tfl_modules WHERE published=1"
|
||||||
|
key_field="id"
|
||||||
|
value_field="title"
|
||||||
|
layout="joomla.form.field.list-fancy-select" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="module_name"
|
||||||
|
label="JGLOBAL_TITLE"
|
||||||
|
description="Leave empty to use module title"
|
||||||
|
type="text" />
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="opt"
|
||||||
|
label="COM_TFLEARN_OPTION"
|
||||||
|
description="Option text"
|
||||||
|
type="text" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="is_correct"
|
||||||
|
label="COM_TFLEARN_CORRECT"
|
||||||
|
description="Select if the option is correct"
|
||||||
|
type="checkbox" />
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="question_id"
|
||||||
|
label="Question ID"
|
||||||
|
type="number" />
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="title"
|
||||||
|
type="text"
|
||||||
|
label="JGLOBAL_TITLE" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="url"
|
||||||
|
type="url"
|
||||||
|
label="Url" />
|
||||||
|
|
||||||
|
<field
|
||||||
|
name="class"
|
||||||
|
type="text"
|
||||||
|
label="Class" />
|
||||||
|
|
||||||
|
</form>
|
||||||
@ -0,0 +1,342 @@
|
|||||||
|
; Used by All
|
||||||
|
COM_TF_ACCORDION="Accordion"
|
||||||
|
COM_TF_ACTIONS="Actions"
|
||||||
|
|
||||||
|
COM_TF_ALL_RECORDS_DELETED="All Records Deleted"
|
||||||
|
COM_TF_ASSOCIATION="Association"
|
||||||
|
COM_TF_AVAILABLE_COLUMNS="Available Columns"
|
||||||
|
COM_TF_AUTHOR_TYPE="Author Type"
|
||||||
|
|
||||||
|
COM_TF_BUTTON="Button"
|
||||||
|
COM_TF_BUTTON_TEXT="Button Text"
|
||||||
|
COM_TF_BUTTON_CLASS="Button Class"
|
||||||
|
|
||||||
|
COM_TF_CUSTOM="Custom"
|
||||||
|
|
||||||
|
COM_TF_GENERAL="General"
|
||||||
|
COM_TF_CONFIG_GENERAL_DESC="These settings apply for overall working of component."
|
||||||
|
COM_TF_NOTIFY="Notifications"
|
||||||
|
COM_TF_CONFIG_NOTIFY_DESC="These settings apply for email notifications."
|
||||||
|
|
||||||
|
COM_TF_COLUMN="Column"
|
||||||
|
COM_TF_COLUMN_SAVE="Column to Save"
|
||||||
|
COM_TF_COLUMNS="Columns"
|
||||||
|
COM_TF_CONFIGURATION="Configuration"
|
||||||
|
COM_TF_CREATED_BY="Created By"
|
||||||
|
COM_TF_CSV_FILE="CSV File"
|
||||||
|
COM_TF_CUSTOM_FIELD="Custom Field"
|
||||||
|
COM_TF_CUSTOM_FIELDS="Custom Fields"
|
||||||
|
|
||||||
|
COM_TF_DASHBOARD="Dashboard"
|
||||||
|
COM_TF_DATE_FORMAT="d M Y H:i"
|
||||||
|
COM_TF_DEFAULT="Default"
|
||||||
|
COM_TF_DELETE="Delete"
|
||||||
|
COM_TF_DOCUMENTATION="Documentation"
|
||||||
|
|
||||||
|
COM_TF_EMPTY_TABLE="Empty Table"
|
||||||
|
COM_TF_EXPORT="Export"
|
||||||
|
COM_TF_EXPORT_PRO="Export (Upgrade to Pro)"
|
||||||
|
COM_TF_EXPORT_COLUMNS_DESC="Enter column names as comma separated values"
|
||||||
|
COM_TF_EXPORT_TYPE_DESC="Select table or data source"
|
||||||
|
COM_TF_EXTENSIONS="Extensions"
|
||||||
|
|
||||||
|
COM_TF_ERROR_SELECT_FIELDS="Fields cannot be empty"
|
||||||
|
COM_TF_ERROR_INVALID_FILE="Uploaded file is not valid"
|
||||||
|
|
||||||
|
COM_TF_FEED_SUMMARY_LIMIT="Feed Summary Limit"
|
||||||
|
|
||||||
|
COM_TF_FIELDSET_BUTTON="Button"
|
||||||
|
COM_TF_FIELDSET_BUTTON_STYLE="Button Style"
|
||||||
|
COM_TF_FIELDSET_STYLES="Styles"
|
||||||
|
|
||||||
|
COM_TF_FILTER="Filter"
|
||||||
|
COM_TF_FILTER_FIELD="Filter Field"
|
||||||
|
COM_TF_FILTER_OPERATOR="Filter Operator"
|
||||||
|
COM_TF_FILTER_VALUE="Filter Value"
|
||||||
|
|
||||||
|
COM_TF_IGNORE_FIRST_ROW="Ignore First Row"
|
||||||
|
COM_TF_IMAGE="Image"
|
||||||
|
COM_TF_IMPORT="Import"
|
||||||
|
COM_TF_IMPORT_PRO="Import (Upgrade to Pro)"
|
||||||
|
COM_TF_IMPORT_CSV="CSV Import"
|
||||||
|
COM_TF_IMPORT_CSV_DESC="Import data from CSV files."
|
||||||
|
COM_TF_IMPORT_TYPE_DESC="Select table or data destination"
|
||||||
|
COM_TF_IMPORT_COLUMNS_DESC="Enter column names as comma separated values"
|
||||||
|
|
||||||
|
COM_TF_KEY="Key"
|
||||||
|
|
||||||
|
COM_TF_LABEL="Label"
|
||||||
|
COM_TF_LAYOUT="Layout"
|
||||||
|
COM_TF_LIMIT="Limit"
|
||||||
|
|
||||||
|
COM_TF_N_ITEMS_DELETED_1="One item deleted"
|
||||||
|
COM_TF_N_ITEMS_DELETED_MORE="%d items deleted"
|
||||||
|
COM_TF_N_ITEMS_PUBLISHED="%d item(s) published"
|
||||||
|
COM_TF_N_ITEMS_UNPUBLISHED="%d item(s) unpublished"
|
||||||
|
COM_TF_N_ITEMS_TRASHED="%d item(s) trashed"
|
||||||
|
COM_TF_N_ITEMS_ARCHIVED="%d item(s) archived"
|
||||||
|
|
||||||
|
COM_TF_NAME="Name"
|
||||||
|
COM_TF_NUM="#"
|
||||||
|
COM_TF_NOTE="Note"
|
||||||
|
|
||||||
|
COM_TF_OFFSET="Offset"
|
||||||
|
COM_TF_ORDER="Order"
|
||||||
|
COM_TF_ORDER_BY="Order By"
|
||||||
|
COM_TF_ORDER_COLUMN="Order Column"
|
||||||
|
COM_TF_ORDER_DIRECTION="Order Direction"
|
||||||
|
COM_TF_ORDERING="Ordering"
|
||||||
|
COM_TF_ORDERING_NOTE_ASC="Note ascending"
|
||||||
|
COM_TF_ORDERING_NOTE_DESC="Note descending"
|
||||||
|
|
||||||
|
COM_TF_PLAIN="Plain"
|
||||||
|
COM_TF_PREMIUM="Premium"
|
||||||
|
COM_TF_PROCESS="Process"
|
||||||
|
COM_TF_PUBLISHER_LOGO="Publisher Logo"
|
||||||
|
COM_TF_PUBLISHER_LOGO_DESC="Should be jpg or png file of 60x600px rectangle"
|
||||||
|
COM_TF_PUBLISHER_NAME="Publisher Name"
|
||||||
|
|
||||||
|
COM_TF_QUERY="Query"
|
||||||
|
COM_TF_QUERY_PRO="Query (Upgrade to Pro)"
|
||||||
|
COM_TF_QUERY_TOOL="Query Tool"
|
||||||
|
COM_TF_QUERY_COLUMN_DESC="Database column name or custom field id for joomla content and users"
|
||||||
|
COM_TF_QUERY_TYPE_DESC="Select database table"
|
||||||
|
|
||||||
|
COM_TF_RECORD_SAVED="Record saved"
|
||||||
|
COM_TF_RECORDS_UPDATED="records updated."
|
||||||
|
COM_TF_RECORDS_IMPORTED="records imported."
|
||||||
|
COM_TF_RECORDS_EXISTS="records already exists."
|
||||||
|
COM_TF_REVIEW="Review"
|
||||||
|
|
||||||
|
COM_TF_SELECT="- Select -"
|
||||||
|
COM_TF_SUPPORT="Support"
|
||||||
|
COM_TF_SCHEMA_TYPE="Schema Type"
|
||||||
|
COM_TF_SHOW_DATE="Show Date"
|
||||||
|
COM_TF_SHOW_SEARCH="Show Search"
|
||||||
|
COM_TF_SHOW_SD="Structured Data"
|
||||||
|
|
||||||
|
COM_TF_TABS="Tabs"
|
||||||
|
COM_TF_TEXT="Text"
|
||||||
|
COM_TF_TOOLBAR_EXPORT="Export"
|
||||||
|
COM_TF_TOOLBAR_IMPORT="Import"
|
||||||
|
COM_TF_TOOLBAR_PREVIEW="Preview"
|
||||||
|
COM_TF_TOOLBAR_PROCESS="Process"
|
||||||
|
COM_TF_TOOLBAR_QUERY="Query"
|
||||||
|
COM_TF_TOTAL_RECORDS="Total Records: "
|
||||||
|
COM_TF_TRUNCATE_TABLE="Truncate Table"
|
||||||
|
COM_TF_TYPE="Type"
|
||||||
|
|
||||||
|
COM_TF_USER="User"
|
||||||
|
COM_TF_USER_ID="User ID"
|
||||||
|
COM_TF_USERS="Users"
|
||||||
|
COM_TF_USER_FIELD="User Field"
|
||||||
|
COM_TF_USER_FIELDS="User Fields"
|
||||||
|
COM_TF_USER_GROUP="User Group"
|
||||||
|
COM_TF_USER_GROUPS="User Groups"
|
||||||
|
|
||||||
|
COM_TF_VALUE="Value"
|
||||||
|
COM_TF_WHERE_CONDITIONS="Where Conditions"
|
||||||
|
|
||||||
|
; Extension Specific
|
||||||
|
COM_TFLEARN_ANSWER="Answer"
|
||||||
|
COM_TFLEARN_ATTEMPTS="Attempts"
|
||||||
|
COM_TFLEARN_ATTEMPT_GAP="Attempt Gap"
|
||||||
|
|
||||||
|
COM_TFLEARN_BUTTON_DETAILS="Details Button Text"
|
||||||
|
COM_TFLEARN_BUTTON_ENROL="Enrol Button Text"
|
||||||
|
COM_TFLEARN_BUTTON_CAPTION="Button Caption"
|
||||||
|
CON_TFLEARN_BUTTON_CLASS="Button Class"
|
||||||
|
|
||||||
|
COM_TFLEARN_COLUMN_A="Column A"
|
||||||
|
COM_TFLEARN_COLUMN_B="Column B"
|
||||||
|
|
||||||
|
COM_TFLEARN_COMPLETION="Completion"
|
||||||
|
COM_TFLEARN_COMPLETIONS="Completions"
|
||||||
|
COM_TFLEARN_COMPLETION_TYPE="Completion Type"
|
||||||
|
COM_TFLEARN_COMPLETION_ADD="Completion: New"
|
||||||
|
COM_TFLEARN_COMPLETION_EDIT="Completion: Edit"
|
||||||
|
|
||||||
|
COM_TFLEARN_CONTENT="Content"
|
||||||
|
COM_TFLEARN_CONTENT_IDS="Content IDs"
|
||||||
|
COM_TFLEARN_CONTENT_ID="Content ID"
|
||||||
|
|
||||||
|
COM_TFLEARN_CORRECT="Correct"
|
||||||
|
|
||||||
|
COM_TFLEARN_COURSE_ADD="Course: New"
|
||||||
|
COM_TFLEARN_COURSE_EDIT="Course: Edit"
|
||||||
|
COM_TFLEARN_COURSE_ID="Course ID"
|
||||||
|
COM_TFLEARN_COURSE="Course"
|
||||||
|
COM_TFLEARN_COURSE_TYPE="Course Type"
|
||||||
|
COM_TFLEARN_COURSES="Courses"
|
||||||
|
|
||||||
|
CON_TFLEARN_CUSTOM_MESSAGE="Custom Message"
|
||||||
|
CON_TFLEARN_CUSTOM_REDIRECT="Custom Redirect"
|
||||||
|
|
||||||
|
COM_TFLEARN_DEPEND="Depend"
|
||||||
|
|
||||||
|
COM_TFLEARN_EMAIL="Email"
|
||||||
|
COM_TFLEARN_ENROL="Enrol"
|
||||||
|
COM_TFLEARN_ENROLMENT="Enrolment"
|
||||||
|
COM_TFLEARN_EXPLANATION="Explanation"
|
||||||
|
|
||||||
|
COM_TFLEARN_FRONT="Front"
|
||||||
|
|
||||||
|
COM_TFLEARN_GRADE="Grade"
|
||||||
|
COM_TFLEARN_GRADE_TYPE="Grade Type"
|
||||||
|
|
||||||
|
COM_TFLEARN_IMAGE="Image"
|
||||||
|
COM_TFLEARN_INTEGRATIONS="Integrations"
|
||||||
|
|
||||||
|
COM_TFLEARN_JOOMLA_ARTICLE_ID="Joomla ID"
|
||||||
|
|
||||||
|
COM_TFLEARN_LESSON_ADD="Lesson: New"
|
||||||
|
COM_TFLEARN_LESSON_EDIT="Lesson: Edit"
|
||||||
|
COM_TFLEARN_LESSONS="Lessons"
|
||||||
|
COM_TFLEARN_LESSON="Lesson"
|
||||||
|
COM_TFLEARN_LINK="Link"
|
||||||
|
|
||||||
|
COM_TFLEARN_MARKS="Marks"
|
||||||
|
|
||||||
|
COM_TFLEARN_MODULE_ADD="Module: New"
|
||||||
|
COM_TFLEARN_MODULE_EDIT="Module: Edit"
|
||||||
|
COM_TFLEARN_MODULE_ID="Module ID"
|
||||||
|
COM_TFLEARN_MODULE="Module"
|
||||||
|
COM_TFLEARN_MODULES="Modules"
|
||||||
|
COM_TFLEARN_MULTIPLE_ATTEMPTS="Multiple Attempts"
|
||||||
|
|
||||||
|
COM_TFLEARN_NEXT_DATE="Next Date"
|
||||||
|
COM_TFLEARN_NOTIFICATIONS="Notifications"
|
||||||
|
|
||||||
|
COM_TFLEARN_OPTION="Option"
|
||||||
|
COM_TFLEARN_OPTION_REF="Option Reference"
|
||||||
|
COM_TFLEARN_ORDERING="Ordering"
|
||||||
|
|
||||||
|
COM_TFLEARN_ORDERING_COMPLETION_TYPE_ASC="Completion type ascending"
|
||||||
|
COM_TFLEARN_ORDERING_COMPLETION_TYPE_DESC="Completion type descending"
|
||||||
|
COM_TFLEARN_ORDERING_COURSE_TYPE_ASC="Type ascending"
|
||||||
|
COM_TFLEARN_ORDERING_COURSE_TYPE_DESC="Type descending"
|
||||||
|
COM_TFLEARN_ORDERING_CREATED_BY_ASC="User ID ascending"
|
||||||
|
COM_TFLEARN_ORDERING_CREATED_BY_DESC="User ID descending"
|
||||||
|
COM_TFLEARN_ORDERING_CREATED_ASC="Date ascending"
|
||||||
|
COM_TFLEARN_ORDERING_CREATED_DESC="Date descending"
|
||||||
|
COM_TFLEARN_ORDERING_FRONT_ASC="Front ascending"
|
||||||
|
COM_TFLEARN_ORDERING_FRONT_DESC="Front descending"
|
||||||
|
COM_TFLEARN_ORDERING_GRADE_ASC="Grade ascending"
|
||||||
|
COM_TFLEARN_ORDERING_GRADE_DESC="Grade descending"
|
||||||
|
COM_TFLEARN_ORDERING_GROUP_ID_ASC="Group ID ascending"
|
||||||
|
COM_TFLEARN_ORDERING_GROUP_ID_DESC="Group ID descending"
|
||||||
|
COM_TFLEARN_ORDERING_LESSON_TYPE_ASC="Type ascending"
|
||||||
|
COM_TFLEARN_ORDERING_LESSON_TYPE_DESC="Type descending"
|
||||||
|
COM_TFLEARN_ORDERING_LESSON_ASC="Lesson ascending"
|
||||||
|
COM_TFLEARN_ORDERING_LESSON_DESC="Lesson descending"
|
||||||
|
COM_TFLEARN_ORDERING_MOD_NAME_ASC="Module ascending"
|
||||||
|
COM_TFLEARN_ORDERING_MOD_NAME_DESC="Module descending"
|
||||||
|
COM_TFLEARN_ORDERING_Q_TYPE_ASC="Type ascending"
|
||||||
|
COM_TFLEARN_ORDERING_Q_TYPE_DESC="Type descending"
|
||||||
|
COM_TFLEARN_ORDERING_REF_ASC="Reference ascending"
|
||||||
|
COM_TFLEARN_ORDERING_REF_DESC="Reference descending"
|
||||||
|
COM_TFLEARN_ORDERING_USER_ID_ASC="User ID ascending"
|
||||||
|
COM_TFLEARN_ORDERING_USER_ID_DESC="User ID descending"
|
||||||
|
|
||||||
|
COM_TFLEARN_PAGE="Page"
|
||||||
|
COM_TFLEARN_PAGES="Pages"
|
||||||
|
COM_TFLEARN_PAGE_ADD="Page: New"
|
||||||
|
COM_TFLEARN_PAGE_EDIT="Page: Edit"
|
||||||
|
COM_TFLEARN_PATH="Path"
|
||||||
|
COM_TFLEARN_PATHS="Paths"
|
||||||
|
COM_TFLEARN_PERCENT="Percent"
|
||||||
|
|
||||||
|
COM_TFLEARN_QUESTION_IDS="Question IDs"
|
||||||
|
COM_TFLEARN_QUESTION="Question"
|
||||||
|
COM_TFLEARN_QUESTIONS="Questions"
|
||||||
|
COM_TFLEARN_QUESTION_ADD="Question: New"
|
||||||
|
COM_TFLEARN_QUESTION_EDIT="Question: Edit"
|
||||||
|
COM_TFLEARN_QUESTION_SOURCE="Question Source"
|
||||||
|
|
||||||
|
COM_TFLEARN_REFERENCE="Reference"
|
||||||
|
COM_TFLEARN_RESOURCES="Resources"
|
||||||
|
COM_TFLEARN_REQUIRED="Required"
|
||||||
|
|
||||||
|
COM_TFLEARN_SCORE="Score"
|
||||||
|
COM_TFLEARN_SCORES="Scores"
|
||||||
|
COM_TFLEARN_SCORE_EDIT="Score: Edit"
|
||||||
|
|
||||||
|
COM_TFLEARN_SELECT_MODULE="Select Module"
|
||||||
|
COM_TFLEARN_SHOW_TITLE="Show Title"
|
||||||
|
COM_TFLEARN_SHOW_CAPTCHA="Show Captcha"
|
||||||
|
COM_TFLEARN_SEO="SEO"
|
||||||
|
COM_TFLEARN_SHORT_DESC="Short Description"
|
||||||
|
COM_TFLEARN_START_DATE="Start Date"
|
||||||
|
|
||||||
|
COM_TFLEARN_TAGS="Tags"
|
||||||
|
COM_TFLEARN_TARGET_WINDOW="Target Window"
|
||||||
|
COM_TFLEARN_TEST="Test"
|
||||||
|
|
||||||
|
COM_TFLEARN_USER_ID="User ID"
|
||||||
|
COM_TFLEARN_USER="User"
|
||||||
|
COM_TFLEARN_USERS="Users"
|
||||||
|
COM_TFLEARN_USER_GROUP="User Group"
|
||||||
|
|
||||||
|
COM_TFLEARN_VALUE="Value"
|
||||||
|
|
||||||
|
; Emptystate
|
||||||
|
COM_TFLEARN_COURSES_EMPTYSTATE_CONTENT="Courses are main learning areas. Courses contain lessons organised in modules."
|
||||||
|
COM_TFLEARN_COURSES_EMPTYSTATE_BUTTON_ADD="Add your first course"
|
||||||
|
COM_TFLEARN_MODULES_EMPTYSTATE_CONTENT="Modules are way of organising lessons in the course. They are in between courses and lessons. One module can be used in multiple courses."
|
||||||
|
COM_TFLEARN_MODULES_EMPTYSTATE_BUTTON_ADD="Add your first module"
|
||||||
|
COM_TFLEARN_LESSONS_EMPTYSTATE_CONTENT="Lessons are like chapters. Lessons can contain text, pages, Joomla articles, external links or quiz."
|
||||||
|
COM_TFLEARN_LESSONS_EMPTYSTATE_BUTTON_ADD="Add your first lesson"
|
||||||
|
COM_TFLEARN_PAGES_EMPTYSTATE_CONTENT="Pages are basic learning units which are used to create lessons."
|
||||||
|
COM_TFLEARN_PAGES_EMPTYSTATE_BUTTON_ADD="Add your first page"
|
||||||
|
COM_TFLEARN_QUESTIONS_EMPTYSTATE_CONTENT="You can add a test or a quiz to a lesson by adding questions."
|
||||||
|
COM_TFLEARN_QUESTIONS_EMPTYSTATE_BUTTON_ADD="Add your first question"
|
||||||
|
COM_TFLEARN_COMPLETIONS_EMPTYSTATE_CONTENT="Here you can see the status of the lessons completed by the users and the score obtained."
|
||||||
|
COM_TFLEARN_SCORES_EMPTYSTATE_CONTENT="Here, you can see all the attempts of the tests or quizzes."
|
||||||
|
|
||||||
|
; Managers
|
||||||
|
COM_TFLEARN_MANAGER_CONFIGURATION="TF Learn: Configuration"
|
||||||
|
COM_TFLEARN_MANAGER_DASHBOARD="TF Learn: Dashboard"
|
||||||
|
COM_TFLEARN_MANAGER_COURSES="TF Learn: Courses"
|
||||||
|
COM_TFLEARN_MANAGER_MODULES="TF Learn: Modules"
|
||||||
|
COM_TFLEARN_MANAGER_LESSONS="TF Learn: Lessons"
|
||||||
|
COM_TFLEARN_MANAGER_PAGES="TF Learn: Pages"
|
||||||
|
COM_TFLEARN_MANAGER_QUESTIONS="TF Learn: Questions"
|
||||||
|
COM_TFLEARN_MANAGER_COMPLETIONS="TF Learn: Completions"
|
||||||
|
COM_TFLEARN_MANAGER_SCORES="TF Learn: Scores"
|
||||||
|
|
||||||
|
; Ordering
|
||||||
|
COM_TFLEARN_COURSE_ASC="Course ascending"
|
||||||
|
COM_TFLEARN_COURSE_DESC="Course descending"
|
||||||
|
COM_TFLEARN_CREATED_ASC="Course ascending"
|
||||||
|
COM_TFLEARN_CREATED_DESC="Course descending"
|
||||||
|
COM_TFLEARN_LESSON_ASC="Lesson ascending"
|
||||||
|
COM_TFLEARN_LESSON_DESC="Lesson descending"
|
||||||
|
COM_TFLEARN_MODULE_ASC="Module ascending"
|
||||||
|
COM_TFLEARN_MODULE_DESC="Module descending"
|
||||||
|
COM_TFLEARN_ORDERING_ASC="Ordering ascending"
|
||||||
|
COM_TFLEARN_ORDERING_DESC="Odering descending"
|
||||||
|
COM_TFLEARN_PUBLISHED_ASC="Status ascending"
|
||||||
|
COM_TFLEARN_PUBLISHED_DESC="Status descending"
|
||||||
|
COM_TFLEARN_TITLE_ASC="Title ascending"
|
||||||
|
COM_TFLEARN_TITLE_DESC="Title descending"
|
||||||
|
COM_TFLEARN_TYPE_ASC="Type ascending"
|
||||||
|
COM_TFLEARN_TYPE_DESC="Type descending"
|
||||||
|
COM_TFLEARN_USER_ASC="User ascending"
|
||||||
|
COM_TFLEARN_USER_DESC="User descending"
|
||||||
|
|
||||||
|
; Configuration
|
||||||
|
COM_TFLEARN_CONFIG_COURSES_DESC="These settings apply for courses view."
|
||||||
|
COM_TFLEARN_CONFIG_COURSE_DESC="These settings apply for single course view."
|
||||||
|
COM_TFLEARN_CONFIG_PATHS_DESC="These settings apply for learning paths (all courses user is enrolled in) view."
|
||||||
|
COM_TFLEARN_CONFIG_PATH_DESC="These settings apply for single learning path view."
|
||||||
|
COM_TFLEARN_CONFIG_PAGE_DESC="These settings apply for single page view."
|
||||||
|
COM_TFLEARN_CONFIG_ENROL_DESC="These settings apply for enrolment form view."
|
||||||
|
COM_TFLEARN_CONFIG_TEST_DESC="These settings apply for test or quiz view."
|
||||||
|
COM_TFLEARN_CONFIG_INTEGRATIONS_DESC="These settings determine how the component will integrate with other extensions."
|
||||||
|
COM_TFLEARN_CONFIG_NOTIFICATIONS_DESC="These settings are for email notifications."
|
||||||
|
COM_TFLEARN_CONFIG_SEO_DESC="These settings are for SEO for search results."
|
||||||
|
|
||||||
|
COM_TFLEARN_N_ITEMS_DELETED_1="One item deleted"
|
||||||
|
COM_TFLEARN_N_ITEMS_DELETED_MORE="%d items deleted"
|
||||||
|
COM_TFLEARN_N_ITEMS_PUBLISHED="%d item(s) published"
|
||||||
|
COM_TFLEARN_N_ITEMS_UNPUBLISHED="%d item(s) unpublished"
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
COM_TFLEARN="TF Learn"
|
||||||
|
COM_TFLEARN_DESC="Joomla component for Learning Management System"
|
||||||
|
|
||||||
|
COM_TFLEARN_MENU="TF Learn"
|
||||||
|
|
||||||
|
COM_TFLEARN_SUBMENU_DASHBOARD="Dashboard"
|
||||||
|
COM_TFLEARN_SUBMENU_COURSES="Courses"
|
||||||
|
COM_TFLEARN_SUBMENU_MODULES="Modules"
|
||||||
|
COM_TFLEARN_SUBMENU_LESSONS="Lessons"
|
||||||
|
COM_TFLEARN_SUBMENU_PAGES="Pages"
|
||||||
|
COM_TFLEARN_SUBMENU_QUESTIONS="Questions"
|
||||||
|
COM_TFLEARN_SUBMENU_COMPLETIONS="Completions"
|
||||||
|
COM_TFLEARN_SUBMENU_SCORES="Scores"
|
||||||
|
|
||||||
|
; Frontend Menu Views
|
||||||
|
COM_TFLEARN_ENROL_FORM_VIEW_TITLE="Enrol"
|
||||||
|
COM_TFLEARN_ENROL_FORM_VIEW_DESC="Create enrolment form to enrol users in the course."
|
||||||
|
|
||||||
|
; Frontend Menu Options
|
||||||
|
COM_TFLEARN_SHOW_CAPTCHA="Show Captcha"
|
||||||
|
COM_TFLEARN_BUTTON_CAPTION="Button Caption"
|
||||||
|
CON_TFLEARN_BUTTON_CLASS="Button Class"
|
||||||
|
CON_TFLEARN_CUSTOM_REDIRECT="Custom Redirect"
|
||||||
|
CON_TFLEARN_CUSTOM_MESSAGE="Custom Message"
|
||||||
|
COM_TFLEARN_SHOW_COURSE_TITLE="Course Title"
|
||||||
|
COM_TFLEARN_SHOW_COURSE_DESCRIPTION="Course Description"
|
||||||
|
|
||||||
|
; Configuration
|
||||||
|
COM_TFLEARN_CONFIGURATION="TF Learn: Options"
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Installer\InstallerAdapter;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Filesystem\File;
|
||||||
|
use Joomla\CMS\Filesystem\Folder;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
|
||||||
|
class com_TfLearnInstallerScript
|
||||||
|
{
|
||||||
|
public $extension = 'com_tflearn';
|
||||||
|
public $admin_folders = array('forms', 'includes', 'language', 'services', 'sql', 'src', 'tmpl');
|
||||||
|
public $site_folders = array('forms', 'includes', 'language', 'src', 'tmpl');
|
||||||
|
|
||||||
|
// 01. Called after component is installed
|
||||||
|
public function install(InstallerAdapter $adapter)
|
||||||
|
{
|
||||||
|
$adapter->getParent()->setRedirectURL('index.php?option=' . $this->extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 02. Called after component is updated
|
||||||
|
public function update(InstallerAdapter $adapter)
|
||||||
|
{
|
||||||
|
$adapter->getParent()->setRedirectURL('index.php?option=' . $this->extension);
|
||||||
|
|
||||||
|
$new_version = $adapter->getManifest()->version;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 03. Called before installation
|
||||||
|
public function preflight($type, InstallerAdapter $adapter)
|
||||||
|
{
|
||||||
|
if ($type == 'update')
|
||||||
|
{
|
||||||
|
foreach ($this->admin_folders as $admin_folder)
|
||||||
|
{
|
||||||
|
$path = JPATH_ADMINISTRATOR . '/components/' . $this->extension . '/' . $admin_folder;
|
||||||
|
if (Folder::exists($path))
|
||||||
|
{
|
||||||
|
Folder::delete($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->site_folders as $site_folder)
|
||||||
|
{
|
||||||
|
$path = JPATH_SITE . '/components/' . $this->extension . '/' . $site_folder;
|
||||||
|
if (Folder::exists($path))
|
||||||
|
{
|
||||||
|
Folder::delete($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
||||||
|
use Joomla\CMS\Categories\CategoryFactoryInterface;
|
||||||
|
use Joomla\CMS\Extension\ComponentInterface;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\CategoryFactory;
|
||||||
|
use Joomla\CMS\Extension\MVCComponent;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\RouterFactory;
|
||||||
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
||||||
|
use Joomla\CMS\Component\Router\RouterFactoryInterface;
|
||||||
|
use Joomla\CMS\HTML\Registry;
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
use TechFry\Component\TfLearn\Administrator\Extension\TfLearnComponent;
|
||||||
|
|
||||||
|
return new class implements ServiceProviderInterface
|
||||||
|
{
|
||||||
|
public function register(Container $container): void
|
||||||
|
{
|
||||||
|
$container->registerServiceProvider(new MVCFactory('\\TechFry\\Component\\TfLearn'));
|
||||||
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\TechFry\\Component\\TfLearn'));
|
||||||
|
$container->registerServiceProvider(new CategoryFactory('\\TechFry\\Component\\TfLearn'));
|
||||||
|
$container->registerServiceProvider(new RouterFactory('\\TechFry\\Component\\TfLearn'));
|
||||||
|
|
||||||
|
$container->set(
|
||||||
|
ComponentInterface::class,
|
||||||
|
function (Container $container)
|
||||||
|
{
|
||||||
|
$component = new TfLearnComponent($container->get(ComponentDispatcherFactoryInterface::class));
|
||||||
|
|
||||||
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
||||||
|
$component->setCategoryFactory($container->get(CategoryFactoryInterface::class));
|
||||||
|
$component->setRouterFactory($container->get(RouterFactoryInterface::class));
|
||||||
|
|
||||||
|
return $component;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_courses` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`alias` VARCHAR(400),
|
||||||
|
`image` VARCHAR(400),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`description` TEXT,
|
||||||
|
`short_desc` VARCHAR(400),
|
||||||
|
`course_type` VARCHAR(400),
|
||||||
|
`front` TINYINT(3),
|
||||||
|
`group_id` INT(10),
|
||||||
|
`modules` TEXT,
|
||||||
|
`enrol` VARCHAR(100),
|
||||||
|
`enrol_link` VARCHAR(400),
|
||||||
|
`ordering` INT(11),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
`hits` INT(10) UNSIGNED,
|
||||||
|
`access` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_modules` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`description` TEXT,
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_lessons` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`description` TEXT,
|
||||||
|
`short_desc` VARCHAR(1000),
|
||||||
|
`lesson_type` VARCHAR(400),
|
||||||
|
`completion_type` VARCHAR(400),
|
||||||
|
`jids` TEXT,
|
||||||
|
`content_source` VARCHAR(255),
|
||||||
|
`resources` TEXT,
|
||||||
|
`questions` TINYINT(3),
|
||||||
|
`marks` TINYINT(3),
|
||||||
|
`pass_percent` TINYINT(3),
|
||||||
|
`multiple_attempts` TINYINT(3),
|
||||||
|
`grade_type` VARCHAR(100),
|
||||||
|
`attempt_gap` TINYINT(3),
|
||||||
|
`ref` VARCHAR(100),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`module` INT(11),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
`ordering` INT(11),
|
||||||
|
`hits` INT(10) UNSIGNED,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_pages` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`alias` VARCHAR(400),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`description` TEXT,
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
`note` VARCHAR(255),
|
||||||
|
`hits` INT(10) UNSIGNED,
|
||||||
|
`ref` VARCHAR(100),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_questions` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`alias` VARCHAR(400),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`description` TEXT,
|
||||||
|
`q_type` VARCHAR(400),
|
||||||
|
`options` MEDIUMTEXT,
|
||||||
|
`matching` MEDIUMTEXT,
|
||||||
|
`answer` VARCHAR(400),
|
||||||
|
`explanation` TEXT,
|
||||||
|
`depend` TINYINT(3),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_scores` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`created_by` INT(11),
|
||||||
|
`email` VARCHAR(400),
|
||||||
|
`attempts` TEXT,
|
||||||
|
`grade` TINYINT(11),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`hits` INT(10) UNSIGNED,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_completion` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`user_id` INT(11),
|
||||||
|
`complete` TINYINT(3),
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__mentor_map` (
|
||||||
|
`course_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
`mentor_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
`student_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
PRIMARY KEY(`course_id`, `mentor_id`, `student_id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
DEFAULT CHARSET=utf8mb4
|
||||||
|
DEFAULT COLLATE=utf8mb4_unicode_ci;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD `alias` VARCHAR(400) AFTER `title`;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD `ordering` INT(11);
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD `ordering` INT(11);
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD `short_desc` VARCHAR(400) AFTER `description`;
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ordering`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_courses` ADD `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `created`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_courses` ADD `access` tinyint(4) NOT NULL DEFAULT '0' AFTER `modified`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_modules` ADD `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `published`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_modules` ADD `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `created`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `module`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `created`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_pathways` ADD `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `published`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_pathways` ADD `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `created`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `courses` MEDIUMTEXT AFTER `id`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `paths` MEDIUMTEXT AFTER `courses`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `enrol` MEDIUMTEXT AFTER `paths`;
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_questions` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`alias` VARCHAR(400),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`description` TEXT,
|
||||||
|
`q_type` VARCHAR(400),
|
||||||
|
`options` MEDIUMTEXT,
|
||||||
|
`answer` VARCHAR(400),
|
||||||
|
`explain` TEXT,
|
||||||
|
`depend` TINYINT(3),
|
||||||
|
`marks` TINYINT(3),
|
||||||
|
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_scores` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`user_id` INT(11),
|
||||||
|
`attempts` TEXT,
|
||||||
|
`grade` TINYINT(11),
|
||||||
|
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_config` ADD `test` MEDIUMTEXT AFTER `enrol`;
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
ALTER TABLE `#__tfl_config` ADD `path` MEDIUMTEXT AFTER `paths`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `course` MEDIUMTEXT AFTER `courses`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `attempts` MEDIUMTEXT AFTER `enrol`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_config` ADD `attempt` MEDIUMTEXT AFTER `attempts`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_scores` ADD `email` VARCHAR(400) AFTER `user_id`;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` ADD `questions` TINYINT(3) AFTER `lesson_type`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD `marks` TINYINT(3) AFTER `questions`;
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_completion` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`lesson_id` INT(11),
|
||||||
|
`user_id` INT(11),
|
||||||
|
`complete` TINYINT(3),
|
||||||
|
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` DROP COLUMN `jid`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `jids` TEXT AFTER `lesson_type`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `completion_type` VARCHAR(400) AFTER `lesson_type`;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD COLUMN `group_id` INT(10) AFTER `front`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_courses` DROP COLUMN `tfmail`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE `#__tfl_pathways`;
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
ALTER TABLE `#__tfl_courses` ADD `created_by` INT(10) AFTER `modified`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_modules` ADD `created_by` INT(10) AFTER `modified`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD `created_by` INT(10) AFTER `modified`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_questions` ADD `created_by` INT(10) AFTER `modified`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `short_desc` VARCHAR(1000) AFTER `description`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `pass_percent` TINYINT(3) AFTER `marks`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_questions` CHANGE `explain` `explanation` TEXT;
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` DROP COLUMN `qsource`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` DROP COLUMN `qids`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_questions` DROP COLUMN `marks`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `multiple_attempts` TINYINT(3) AFTER `pass_percent`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `grade_type` VARCHAR(100) AFTER `multiple_attempts`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `attempt_gap` TINYINT(3) AFTER `grade_type`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `hits` INT(10) UNSIGNED AFTER `ordering`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_courses` ADD COLUMN `hits` INT(10) UNSIGNED AFTER `created_by`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_scores` ADD COLUMN `hits` INT(10) UNSIGNED AFTER `modified`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_scores` CHANGE `user_id` `created_by` INT(11);
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE `#__tfl_config`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_questions` ADD COLUMN `matching` MEDIUMTEXT AFTER `options`;
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `#__tfl_pages` (
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` VARCHAR(400),
|
||||||
|
`alias` VARCHAR(400),
|
||||||
|
`published` TINYINT(3),
|
||||||
|
`description` TEXT,
|
||||||
|
`created` DATETIME,
|
||||||
|
`modified` DATETIME,
|
||||||
|
`created_by` INT(10),
|
||||||
|
`note` VARCHAR(255),
|
||||||
|
`hits` INT(10) UNSIGNED,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=0
|
||||||
|
DEFAULT CHARSET=utf8mb4;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `content_source` VARCHAR(255) AFTER `jids`;
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `#__mentor_map` (
|
||||||
|
`course_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
`mentor_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
`student_id` INT(10) UNSIGNED DEFAULT 0,
|
||||||
|
PRIMARY KEY(`course_id`, `mentor_id`, `student_id`)
|
||||||
|
)
|
||||||
|
ENGINE=InnoDB
|
||||||
|
DEFAULT CHARSET=utf8mb4
|
||||||
|
DEFAULT COLLATE=utf8mb4_unicode_ci;
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
ALTER TABLE `#__tfl_lessons` DROP COLUMN `link`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `resources` TEXT AFTER `content_source`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_lessons` ADD COLUMN `ref` VARCHAR(100) AFTER `attempt_gap`;
|
||||||
|
|
||||||
|
ALTER TABLE `#__tfl_pages` ADD COLUMN `ref` VARCHAR(100) AFTER `hits`;
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class CompletionController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class CompletionsController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Completion', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class CourseController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class CoursesController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Course', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\MVC\Controller\BaseController;
|
||||||
|
|
||||||
|
class DisplayController extends BaseController
|
||||||
|
{
|
||||||
|
protected $default_view = 'dashboard';
|
||||||
|
|
||||||
|
public function display($cachable = false, $urlparams = array())
|
||||||
|
{
|
||||||
|
return parent::display();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerExport;
|
||||||
|
|
||||||
|
class ExportController extends TfControllerExport
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerImport;
|
||||||
|
|
||||||
|
class ImportController extends TfControllerImport
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class LessonController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class LessonsController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Lesson', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class ModuleController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class ModulesController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Module', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class PageController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class PagesController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Page', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerQuery;
|
||||||
|
|
||||||
|
class QueryController extends TfControllerQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class QuestionController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class QuestionsController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Question', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerForm;
|
||||||
|
|
||||||
|
class ScoreController extends TfControllerForm
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Controller;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Controller\TfControllerAdmin;
|
||||||
|
|
||||||
|
class ScoresController extends TfControllerAdmin
|
||||||
|
{
|
||||||
|
public function getModel($name = 'Score', $prefix = 'Administrator', $config = array('ignore_request' => true))
|
||||||
|
{
|
||||||
|
$model = parent::getModel($name, $prefix, $config);
|
||||||
|
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Extension;
|
||||||
|
|
||||||
|
defined('JPATH_PLATFORM') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Categories\CategoryServiceInterface;
|
||||||
|
use Joomla\CMS\Categories\CategoryServiceTrait;
|
||||||
|
use Joomla\CMS\Extension\BootableExtensionInterface;
|
||||||
|
use Joomla\CMS\Extension\MVCComponent;
|
||||||
|
use Joomla\CMS\Application\SiteApplication;
|
||||||
|
use Joomla\CMS\Component\Router\RouterServiceInterface;
|
||||||
|
use Joomla\CMS\Component\Router\RouterServiceTrait;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
|
||||||
|
use Psr\Container\ContainerInterface;
|
||||||
|
// use TechFry\Component\TechFry\Administrator\Service\HTML\AdministratorService;
|
||||||
|
|
||||||
|
class TfLearnComponent extends MVCComponent implements BootableExtensionInterface, CategoryServiceInterface, RouterServiceInterface
|
||||||
|
{
|
||||||
|
use CategoryServiceTrait;
|
||||||
|
use HTMLRegistryAwareTrait;
|
||||||
|
use RouterServiceTrait;
|
||||||
|
|
||||||
|
public function boot(ContainerInterface $container)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class CompletionModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_completion';
|
||||||
|
|
||||||
|
$this->subform_fields = array('modules');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
// 01. Get latest score for lesson and user (Check its usage and shift to Helper)
|
||||||
|
public function getScore($user_id, $lesson_id)
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select($db->quoteName(array('grade')))
|
||||||
|
->from($db->quoteName('#__tfl_scores'))
|
||||||
|
->where($db->quoteName('user_id') . ' = '. $db->quote($user_id))
|
||||||
|
->andWhere($db->quoteName('lesson_id') . ' = '. $db->quote($lesson_id))
|
||||||
|
->order('created DESC')
|
||||||
|
->setLimit('1');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = $db->loadResult();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class CompletionsModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_completion';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.user_id', 'a.published', 'a.lesson_id', 'a.complete', 'a.created', 'b.questions', 'b.marks', 'b.title as lesson');
|
||||||
|
|
||||||
|
$this->joins = array(
|
||||||
|
array('table' => 'tfl_lessons', 'on' => 'lesson_id')
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->filters['user'] = 'user_id';
|
||||||
|
$this->filters['lesson_id'] = 'a.lesson_id';
|
||||||
|
|
||||||
|
array_push($this->sorting_fields, 'a.created', 'lesson', 'user_id');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
// 01. Get modules from course (Check its usage and shift to Helper)
|
||||||
|
public function getModules($course_id)
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select($db->quoteName(array('modules')))
|
||||||
|
->from($db->quoteName('#__tfl_courses'))
|
||||||
|
->where($db->quoteName('id') . ' = '. $db->quote($course_id))
|
||||||
|
->setLimit('1');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = $db->loadResult();
|
||||||
|
|
||||||
|
$result = json_decode($result, true);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 02. Get lessons for modules (Check its usage and shift to Helper)
|
||||||
|
public function getLessons($module_id)
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select('*')
|
||||||
|
->from($db->quoteName('#__tfl_lessons'))
|
||||||
|
->where($db->quoteName('module') . ' = '. $db->quote($module_id))
|
||||||
|
->andWhere($db->quoteName('published') . ' = '. $db->quote(1))
|
||||||
|
->order($db->quoteName('ordering') . ' ASC');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$rows = $db->loadAssocList();
|
||||||
|
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 03. Get latest score for lesson and user (Check its usage and shift to Helper)
|
||||||
|
public function getScore($user_id, $lesson_id)
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select($db->quoteName(array('grade')))
|
||||||
|
->from($db->quoteName('#__tfl_scores'))
|
||||||
|
->where($db->quoteName('created_by') . ' = '. $db->quote($user_id))
|
||||||
|
->andWhere($db->quoteName('lesson_id') . ' = '. $db->quote($lesson_id))
|
||||||
|
->order('created DESC')
|
||||||
|
->setLimit('1');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = $db->loadResult();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 04. Get completion status for lesson and user (Check its usage and shift to Helper)
|
||||||
|
public function getCompletion($lesson_id, $user_id)
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select($db->quoteName(array('complete')))
|
||||||
|
->from($db->quoteName('#__tfl_completion'))
|
||||||
|
->where($db->quoteName('lesson_id') . ' = '. $db->quote($lesson_id))
|
||||||
|
->andWhere($db->quoteName('user_id') . ' = '. $db->quote($user_id))
|
||||||
|
->setLimit('1');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = $db->loadResult();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 05. Get total number of lessons in course (Check its usage and shift to Helper)
|
||||||
|
public function totalLessons($modules)
|
||||||
|
{
|
||||||
|
$module_ids = array();
|
||||||
|
if (is_array($modules))
|
||||||
|
{
|
||||||
|
foreach ($modules as $module)
|
||||||
|
{
|
||||||
|
$module_ids[] = $module['module_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($module_ids))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select('COUNT(*)')
|
||||||
|
->from($db->quoteName('#__tfl_lessons'))
|
||||||
|
->where($db->quoteName('module') . ' IN (' . implode(',', $module_ids) . ')')
|
||||||
|
->andWhere($db->quoteName('published') . ' = '. $db->quote(1));
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = $db->loadResult();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class CourseModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_courses';
|
||||||
|
|
||||||
|
$this->subform_fields = array('modules');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class CoursesModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_courses';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.title', 'a.alias', 'a.published', 'a.course_type', 'a.ordering', 'a.front', 'a.group_id', 'a.hits');
|
||||||
|
|
||||||
|
array_push($this->sorting_fields, 'a.course_type', 'a.front', 'a.group_id');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelDashboard;
|
||||||
|
|
||||||
|
class DashboardModel extends TfModelDashboard
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\TfModelExport;
|
||||||
|
|
||||||
|
class ExportModel extends TfModelExport
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->export_tables = array(
|
||||||
|
'courses' => 'tfl_courses',
|
||||||
|
'modules' => 'tfl_modules',
|
||||||
|
'lessons' => 'tfl_lessons',
|
||||||
|
'pages' => 'tfl_pages',
|
||||||
|
'questions' => 'tfl_questions',
|
||||||
|
'completions' => 'tfl_completion',
|
||||||
|
'scores' => 'tfl_scores',
|
||||||
|
'joomla_content' => 'content');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\TfModelImport;
|
||||||
|
|
||||||
|
class ImportModel extends TfModelImport
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->import_tables = array(
|
||||||
|
'courses' => 'tfl_courses',
|
||||||
|
'modules' => 'tfl_modules',
|
||||||
|
'lessons' => 'tfl_lessons',
|
||||||
|
'pages' => 'tfl_pages',
|
||||||
|
'questions' => 'tfl_questions');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class LessonModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_lessons';
|
||||||
|
|
||||||
|
$this->subform_fields = array('jids', 'resources');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class LessonsModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_lessons';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.title', 'a.published', 'a.lesson_type', 'a.ordering', 'a.completion_type', 'a.pass_percent', 'a.hits', 'a.ref', 'b.title as mod_name');
|
||||||
|
|
||||||
|
$this->joins = array(
|
||||||
|
array('table' => 'tfl_modules', 'on' => 'module')
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->filters['module'] = 'module';
|
||||||
|
$this->filters['lesson_type'] = 'a.lesson_type';
|
||||||
|
$this->filters['completion_type'] = 'a.completion_type';
|
||||||
|
|
||||||
|
array_push($this->sorting_fields, 'a.lesson_type', 'a.completion_type', 'mod_name', 'a.ref');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class ModuleModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_modules';
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class ModulesModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_modules';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.title', 'a.published');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class PageModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_pages';
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class PagesModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_pages';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.title', 'a.alias', 'a.published', 'a.modified', 'a.hits', 'a.ref');
|
||||||
|
|
||||||
|
$this->sorting_fields[] = 'a.ref';
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\TfModelQuery;
|
||||||
|
|
||||||
|
class QueryModel extends TfModelQuery
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->action_tables = array('courses' => 'tfl_courses', 'modules' => 'tfl_modules', 'lessons' => 'tfl_lessons', 'questions' => 'tfl_questions',
|
||||||
|
'completions' => 'tfl_completion', 'scores' => 'tfl_scores', 'users' => 'users');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class QuestionModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_questions';
|
||||||
|
|
||||||
|
$this->subform_fields = array('options', 'matching');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class QuestionsModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_questions';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.title', 'a.published', 'a.q_type', 'b.title as lesson');
|
||||||
|
|
||||||
|
$this->joins = array(
|
||||||
|
array('table' => 'tfl_lessons', 'on' => 'lesson_id')
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->filters['lesson'] = 'lesson_id';
|
||||||
|
$this->filters['q_type'] = 'a.q_type';
|
||||||
|
|
||||||
|
array_push($this->sorting_fields, 'a.q_type', 'lesson');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
public function get_question_type($id)
|
||||||
|
{
|
||||||
|
$question_types = array(
|
||||||
|
'Not Defined',
|
||||||
|
'Multiple Choice - Single',
|
||||||
|
'Multiple Choice - Multi',
|
||||||
|
'Numerical', 'Short Answer',
|
||||||
|
'Matching',
|
||||||
|
'True False',
|
||||||
|
'Description'
|
||||||
|
);
|
||||||
|
|
||||||
|
return $question_types[$id];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Component\TfLearn\Administrator\Model\QuestionModel;
|
||||||
|
use TechFry\Library\Model\Back\TfModelForm;
|
||||||
|
|
||||||
|
class ScoreModel extends TfModelForm
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_scores';
|
||||||
|
|
||||||
|
$this->subform_fields = array('modules');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************************************************************
|
||||||
|
|
||||||
|
public function getAttempts($attempts)
|
||||||
|
{
|
||||||
|
$qModel = new QuestionModel;
|
||||||
|
$questions = array();
|
||||||
|
|
||||||
|
foreach ($attempts as $k => $v)
|
||||||
|
{
|
||||||
|
$qid = substr($k, 1);
|
||||||
|
$questions[] = $qModel->getItem($qid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $questions;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use TechFry\Library\Model\Back\TfModelList;
|
||||||
|
|
||||||
|
class ScoresModel extends TfModelList
|
||||||
|
{
|
||||||
|
public function __construct($config = array())
|
||||||
|
{
|
||||||
|
$this->table_name = 'tfl_scores';
|
||||||
|
|
||||||
|
$this->select_fields = array('a.id', 'a.published', 'a.grade', 'a.created', 'a.created_by', 'b.title as lesson');
|
||||||
|
|
||||||
|
$this->joins = array(
|
||||||
|
array('table' => 'tfl_lessons', 'on' => 'lesson_id'));
|
||||||
|
|
||||||
|
array_push($this->sorting_fields, 'a.grade', 'a.created_by', 'a.created', 'lesson');
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class CompletionTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_completion', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class CourseTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_courses', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class LessonTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_lessons', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class ModuleTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_modules', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class PageTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_pages', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* @package TF Learn Component
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace TechFry\Component\TfLearn\Administrator\Table;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Table\Table;
|
||||||
|
use Joomla\Database\DatabaseDriver;
|
||||||
|
|
||||||
|
class QuestionTable extends Table
|
||||||
|
{
|
||||||
|
function __construct(DatabaseDriver $db)
|
||||||
|
{
|
||||||
|
parent::__construct('#__tfl_questions', 'id', $db);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user