├── _config.yml ├── assets ├── img │ ├── logo.png │ ├── logo@3x.png │ ├── main-bg.png │ ├── bg-element.png │ ├── button-field.png │ ├── button-frame.png │ ├── play-button.png │ ├── rectangle-2.png │ ├── bg-element@3x.png │ ├── multiple-select.png │ └── video-background.png ├── fonts │ ├── ionicons.eot │ ├── ionicons.ttf │ └── ionicons.woff ├── js │ └── flatpickr_l10n │ │ ├── ja.js │ │ ├── he.js │ │ ├── ar.js │ │ ├── bg.js │ │ ├── pa.js │ │ ├── sq.js │ │ ├── hi.js │ │ ├── ko.js │ │ ├── si.js │ │ ├── bn.js │ │ ├── tr.js │ │ ├── ru.js │ │ ├── uk.js │ │ ├── hr.js │ │ ├── da.js │ │ ├── lv.js │ │ ├── pl.js │ │ ├── vn.js │ │ ├── fa.js │ │ ├── pt.js │ │ ├── cs.js │ │ ├── ms.js │ │ ├── id.js │ │ ├── zh.js │ │ ├── es.js │ │ ├── my.js │ │ ├── ro.js │ │ ├── mk.js │ │ ├── sk.js │ │ ├── sr.js │ │ ├── fi.js │ │ ├── sv.js │ │ ├── sl.js │ │ ├── de.js │ │ ├── it.js │ │ ├── hu.js │ │ ├── th.js │ │ ├── no.js │ │ ├── lt.js │ │ ├── et.js │ │ ├── eo.js │ │ ├── cat.js │ │ ├── fr.js │ │ ├── nl.js │ │ ├── gr.js │ │ ├── cy.js │ │ └── index.js └── css │ └── pdf.css ├── .gitignore ├── templates ├── student_badges.mustache ├── access_alert.mustache ├── instructor_dashboard_settings.mustache ├── parts_table_bottom.mustache └── student_badges_courses_field.mustache ├── amd ├── build │ ├── intelliboard.min.js │ ├── instructor.min.js │ └── intb_circlechart.min.js └── src │ ├── intelliboard.js │ └── instructor.js ├── classes ├── repositories │ ├── user_settings.php │ └── modules_repository.php ├── attendance │ ├── OAuthException.php │ ├── reports │ │ ├── attendance_report_interface.php │ │ ├── lateness_percent_table.php │ │ ├── persistent_absence.php │ │ ├── perfect_attendance.php │ │ ├── attendance_ytd_table.php │ │ ├── consecutive_absences.php │ │ ├── attendance_report.php │ │ └── course_enrollments.php │ ├── OAuthSignatureMethod.php │ ├── OAuthConsumer.php │ ├── OAuthSignatureMethod_HMAC_SHA1.php │ └── OAuthUtil.php ├── tools │ ├── lti_tool.php │ ├── bb_collaborate_tool.php │ └── os_classifier.php ├── output │ └── renderer.php ├── bb_collaborate │ ├── session_attendances.php │ └── bb_collaborate_repository.php ├── task │ ├── check_active_bbb_meetings.php │ └── attendance_sync.php └── instructorlib.php ├── .travis.yml ├── README.md ├── views ├── footer.php ├── export_filter.php ├── report44.php └── menu.php ├── db ├── caches.php ├── messages.php ├── tasks.php ├── events.php └── access.php ├── version.php ├── search └── src │ ├── Helpers │ ├── FunctionHelper.php │ ├── ArrayHelper.php │ ├── ParamGetter.php │ └── PluralHelper.php │ ├── Containers │ ├── BaseContainer.php │ ├── HavingsContainer.php │ ├── GroupsContainer.php │ └── OrdersContainer.php │ └── autoload.php ├── config.php ├── tests └── local_intelliboard_tracking_test.php ├── sqlreports.php ├── attendance ├── launch.php ├── attendancelib.php └── index.php ├── competencies ├── views │ └── menu.php └── reports.php ├── output ├── forms │ └── local_intelliboard_sqlreport.php └── tables │ └── reports_table.php ├── instructor ├── monitors.php ├── reports.php ├── analytics.php └── views │ └── menu.php ├── monitors.php ├── student ├── badges.php └── reports.php ├── sqlreport.php └── reports.php /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/logo.png -------------------------------------------------------------------------------- /assets/img/logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/logo@3x.png -------------------------------------------------------------------------------- /assets/img/main-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/main-bg.png -------------------------------------------------------------------------------- /assets/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/fonts/ionicons.eot -------------------------------------------------------------------------------- /assets/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/fonts/ionicons.ttf -------------------------------------------------------------------------------- /assets/img/bg-element.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/bg-element.png -------------------------------------------------------------------------------- /assets/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/fonts/ionicons.woff -------------------------------------------------------------------------------- /assets/img/button-field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/button-field.png -------------------------------------------------------------------------------- /assets/img/button-frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/button-frame.png -------------------------------------------------------------------------------- /assets/img/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/play-button.png -------------------------------------------------------------------------------- /assets/img/rectangle-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/rectangle-2.png -------------------------------------------------------------------------------- /assets/img/bg-element@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/bg-element@3x.png -------------------------------------------------------------------------------- /assets/img/multiple-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/multiple-select.png -------------------------------------------------------------------------------- /assets/img/video-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/intelliboard/master/assets/img/video-background.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Add any directories, files, or patterns you don't want to be tracked by version control 2 | 3 | .DS_Store 4 | .idea 5 | -------------------------------------------------------------------------------- /templates/student_badges.mustache: -------------------------------------------------------------------------------- 1 |
2 | {{{student_menu}}} 3 |
-------------------------------------------------------------------------------- /templates/access_alert.mustache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /amd/build/intelliboard.min.js: -------------------------------------------------------------------------------- 1 | define(["jquery","local_intelliboard/intb_circlechart"],function(a){return{circleProgress:function(b){b=JSON.parse(b),a(document).ready(function(){a(".circle-progress").percentcircle(b)})}}}); -------------------------------------------------------------------------------- /templates/instructor_dashboard_settings.mustache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/repositories/user_settings.php: -------------------------------------------------------------------------------- 1 | get_records( 12 | 'local_intelliboard_assign', 13 | ['rel' => 'instructordashboard', 'type' => 'courses', 'userid' => $userid], 14 | '', 15 | 'instance, rel, type, userid, timecreated' 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ja.js: -------------------------------------------------------------------------------- 1 | /* Japanese locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ja = {}; 4 | 5 | flatpickr.l10ns.ja.weekdays = { 6 | shorthand: ["日", "月", "火", "水", "木", "金", "土"], 7 | longhand: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"] 8 | }; 9 | 10 | flatpickr.l10ns.ja.months = { 11 | shorthand: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 12 | longhand: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /amd/build/instructor.min.js: -------------------------------------------------------------------------------- 1 | define(["jquery","core/ajax","local_intelliboard/intb_multipleselect"],function(a,b){return{dashboardSettings:function(c){let d=a(".instructor-courses-settings"),e=a(".instructor-dashboard-settings-wrapper");d.multipleSelect({multiple:!0,placeholder:c,multipleWidth:350,filter:!0}),e.find(".ms-drop.bottom").append(""),e.find(".ms-drop.bottom button").on("click",function(){let a=d.val();null==a&&(a=[]);let c=b.call([{methodname:"local_intelliboard_save_instructor_courses",args:{data:JSON.stringify({courses:a})}}]);c[0].done(function(){window.location.reload()})})}}}); -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/he.js: -------------------------------------------------------------------------------- 1 | /* Hebrew locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.he = {}; 4 | 5 | flatpickr.l10ns.he.weekdays = { 6 | shorthand: ["א", "ב", "ג", "ד", "ה", "ו", "ז"], 7 | longhand: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"] 8 | }; 9 | 10 | flatpickr.l10ns.he.months = { 11 | shorthand: ["ינו׳", "פבר׳", "מרץ", "אפר׳", "מאי", "יוני", "יולי", "אוג׳", "ספט׳", "אוק׳", "נוב׳", "דצמ׳"], 12 | longhand: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ar.js: -------------------------------------------------------------------------------- 1 | /* Arabic locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ar = {}; 4 | 5 | flatpickr.l10ns.ar.weekdays = { 6 | shorthand: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"], 7 | longhand: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"] 8 | }; 9 | 10 | flatpickr.l10ns.ar.months = { 11 | shorthand: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], 12 | longhand: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/bg.js: -------------------------------------------------------------------------------- 1 | /* Bulgarian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.bg = {}; 4 | 5 | flatpickr.l10ns.bg.weekdays = { 6 | shorthand: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], 7 | longhand: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"] 8 | }; 9 | 10 | flatpickr.l10ns.bg.months = { 11 | shorthand: ["Яну", "Фев", "Март", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], 12 | longhand: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/pa.js: -------------------------------------------------------------------------------- 1 | /* Punjabi locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.pa = {}; 4 | 5 | flatpickr.l10ns.pa.weekdays = { 6 | shorthand: ["ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"], 7 | longhand: ["ਐਤਵਾਰ", "ਸੋਮਵਾਰ", "ਮੰਗਲਵਾਰ", "ਬੁੱਧਵਾਰ", "ਵੀਰਵਾਰ", "ਸ਼ੁੱਕਰਵਾਰ", "ਸ਼ਨਿੱਚਰਵਾਰ"] 8 | }; 9 | 10 | flatpickr.l10ns.pa.months = { 11 | shorthand: ["ਜਨ", "ਫ਼ਰ", "ਮਾਰ", "ਅਪ੍ਰੈ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾ", "ਅਗ", "ਸਤੰ", "ਅਕ", "ਨਵੰ", "ਦਸੰ"], 12 | longhand: ["ਜਨਵਰੀ", "ਫ਼ਰਵਰੀ", "ਮਾਰਚ", "ਅਪ੍ਰੈਲ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾਈ", "ਅਗਸਤ", "ਸਤੰਬਰ", "ਅਕਤੂਬਰ", "ਨਵੰਬਰ", "ਦਸੰਬਰ"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/sq.js: -------------------------------------------------------------------------------- 1 | /* Albanian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.sq = {}; 4 | 5 | flatpickr.l10ns.sq.weekdays = { 6 | shorthand: ["Di", "Hë", "Ma", "Më", "En", "Pr", "Sh"], 7 | longhand: ["E Diel", "E Hënë", "E Martë", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"] 8 | }; 9 | 10 | flatpickr.l10ns.sq.months = { 11 | shorthand: ["Jan", "Shk", "Mar", "Pri", "Maj", "Qer", "Kor", "Gus", "Sht", "Tet", "Nën", "Dhj"], 12 | longhand: ["Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/hi.js: -------------------------------------------------------------------------------- 1 | /* Hindi locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.hi = {}; 4 | 5 | flatpickr.l10ns.hi.weekdays = { 6 | shorthand: ["रवि", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"], 7 | longhand: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"] 8 | }; 9 | 10 | flatpickr.l10ns.hi.months = { 11 | shorthand: ["जन", "फर", "मार्च", "अप्रेल", "मई", "जून", "जूलाई", "अग", "सित", "अक्ट", "नव", "दि"], 12 | longhand: ["जनवरी ", "फरवरी", "मार्च", "अप्रेल", "मई", "जून", "जूलाई", "अगस्त ", "सितम्बर", "अक्टूबर", "नवम्बर", "दिसम्बर"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ko.js: -------------------------------------------------------------------------------- 1 | /* Republic of Korea locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ko = {}; 4 | 5 | flatpickr.l10ns.ko.weekdays = { 6 | shorthand: ["일", "월", "화", "수", "목", "금", "토"], 7 | longhand: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"] 8 | }; 9 | 10 | flatpickr.l10ns.ko.months = { 11 | shorthand: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], 12 | longhand: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"] 13 | }; 14 | 15 | flatpickr.l10ns.ko.ordinal = function () { 16 | return "일"; 17 | }; 18 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/si.js: -------------------------------------------------------------------------------- 1 | /* Sinhala locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.si = {}; 4 | 5 | flatpickr.l10ns.si.weekdays = { 6 | shorthand: ["ඉ", "ස", "අ", "බ", "බ්‍ර", "සි", "සෙ"], 7 | longhand: ["ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්‍රහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"] 8 | }; 9 | 10 | flatpickr.l10ns.si.months = { 11 | shorthand: ["ජන", "පෙබ", "මාර්", "අප්‍රේ", "මැයි", "ජුනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"], 12 | longhand: ["ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්‍රේල්", "මැයි", "ජුනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"] 13 | }; 14 | 15 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/bn.js: -------------------------------------------------------------------------------- 1 | /* Bangla locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.bn = {}; 4 | 5 | flatpickr.l10ns.bn.weekdays = { 6 | shorthand: ["রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি"], 7 | longhand: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"] 8 | }; 9 | 10 | flatpickr.l10ns.bn.months = { 11 | shorthand: ["জানু", "ফেব্রু", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগ", "সেপ্টে", "অক্টো", "নভে", "ডিসে"], 12 | longhand: ["জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"] 13 | }; 14 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/tr.js: -------------------------------------------------------------------------------- 1 | /* Turkish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.tr = {}; 4 | 5 | flatpickr.l10ns.tr.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.tr.weekdays = { 8 | shorthand: ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"], 9 | longhand: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"] 10 | }; 11 | 12 | flatpickr.l10ns.tr.months = { 13 | shorthand: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], 14 | longhand: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"] 15 | }; 16 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ru.js: -------------------------------------------------------------------------------- 1 | /* Russian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ru = {}; 4 | 5 | flatpickr.l10ns.ru.firstDayOfWeek = 1; // Monday 6 | 7 | flatpickr.l10ns.ru.weekdays = { 8 | shorthand: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], 9 | longhand: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"] 10 | }; 11 | 12 | flatpickr.l10ns.ru.months = { 13 | shorthand: ["Янв", "Фев", "Март", "Апр", "Май", "Июнь", "Июль", "Авг", "Сен", "Окт", "Ноя", "Дек"], 14 | longhand: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"] 15 | }; 16 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/uk.js: -------------------------------------------------------------------------------- 1 | /* Ukrainian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.uk = {}; 4 | 5 | flatpickr.l10ns.uk.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.uk.weekdays = { 8 | shorthand: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], 9 | longhand: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"] 10 | }; 11 | 12 | flatpickr.l10ns.uk.months = { 13 | shorthand: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], 14 | longhand: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"] 15 | }; 16 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/hr.js: -------------------------------------------------------------------------------- 1 | /* Croatian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.hr = {}; 4 | 5 | flatpickr.l10ns.hr.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.hr.weekdays = { 8 | shorthand: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"], 9 | longhand: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"] 10 | }; 11 | 12 | flatpickr.l10ns.hr.months = { 13 | shorthand: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], 14 | longhand: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"] 15 | }; 16 | 17 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/da.js: -------------------------------------------------------------------------------- 1 | /* Danish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.da = {}; 4 | 5 | flatpickr.l10ns.da.weekdays = { 6 | shorthand: ["Søn", "Man", "Tir", "Ons", "Tors", "Fre", "Lør"], 7 | longhand: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] 8 | }; 9 | 10 | flatpickr.l10ns.da.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], 12 | longhand: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"] 13 | }; 14 | 15 | flatpickr.l10ns.da.ordinal = function () { 16 | return "."; 17 | }; 18 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/lv.js: -------------------------------------------------------------------------------- 1 | /* Latvian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.lv = {}; 4 | 5 | flatpickr.l10ns.lv.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.lv.weekdays = { 8 | shorthand: ["Sv", "P", "Ot", "Tr", "Ce", "Pk", "Se"], 9 | longhand: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"] 10 | }; 11 | 12 | flatpickr.l10ns.lv.months = { 13 | shorthand: ["Jan", "Feb", "Mar", "Mai", "Apr", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"], 14 | longhand: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"] 15 | }; 16 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/pl.js: -------------------------------------------------------------------------------- 1 | /* Polish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.pl = {}; 4 | 5 | flatpickr.l10ns.pl.weekdays = { 6 | shorthand: ["Nd", "Pn", "Wt", "Śr", "Cz", "Pt", "So"], 7 | longhand: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"] 8 | }; 9 | 10 | flatpickr.l10ns.pl.months = { 11 | shorthand: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"], 12 | longhand: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"] 13 | }; 14 | 15 | flatpickr.l10ns.pl.ordinal = function () { 16 | return "."; 17 | }; 18 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/vn.js: -------------------------------------------------------------------------------- 1 | /* Vietnamese locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.vn = {}; 4 | 5 | flatpickr.l10ns.vn.weekdays = { 6 | shorthand: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], 7 | longhand: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"] 8 | }; 9 | 10 | flatpickr.l10ns.vn.months = { 11 | shorthand: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"], 12 | longhand: ["Tháng một", "Tháng hai", "Tháng ba", "Tháng tư", "Tháng năm", "Tháng sáu", "Tháng bảy", "Tháng tám", "Tháng chín", "Tháng mười", "Tháng 11", "Tháng 12"] 13 | }; 14 | 15 | flatpickr.l10ns.vn.firstDayOfWeek = 1; 16 | 17 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/fa.js: -------------------------------------------------------------------------------- 1 | /* Farsi (Persian) locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.fa = {}; 4 | 5 | flatpickr.l10ns.fa.weekdays = { 6 | shorthand: ["یک", "دو", "سه", "چهار", "پنج", "آدینه", "شنبه"], 7 | longhand: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنچ‌شنبه", "آدینه", "شنبه"] 8 | }; 9 | 10 | flatpickr.l10ns.fa.months = { 11 | shorthand: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], 12 | longhand: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"] 13 | }; 14 | 15 | flatpickr.l10ns.fa.ordinal = function () { 16 | return ""; 17 | }; 18 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/pt.js: -------------------------------------------------------------------------------- 1 | /* Portuguese locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.pt = {}; 4 | 5 | flatpickr.l10ns.pt.weekdays = { 6 | shorthand: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], 7 | longhand: ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"] 8 | }; 9 | 10 | flatpickr.l10ns.pt.months = { 11 | shorthand: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], 12 | longhand: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"] 13 | }; 14 | 15 | flatpickr.l10ns.pt.rangeSeparator = " até "; 16 | 17 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /templates/parts_table_bottom.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{{ pagination_html }}} 4 |
5 |
6 | 14 |
15 |
16 |
17 | {{# js }} 18 | require(['jquery'], function($) { 19 | $('.intelliboard-table-bottom .intb-page-size > select').on('change', function() { 20 | window.location.href = $(this).find( 21 | 'option:selected' 22 | ).attr('data-link'); 23 | }); 24 | }); 25 | {{/ js }} 26 | -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/cs.js: -------------------------------------------------------------------------------- 1 | /* Czech locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.cs = {}; 4 | 5 | flatpickr.l10ns.cs.weekdays = { 6 | shorthand: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"], 7 | longhand: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"] 8 | }; 9 | 10 | flatpickr.l10ns.cs.months = { 11 | shorthand: ["Led", "Ún", "Bře", "Dub", "Kvě", "Čer", "Čvc", "Srp", "Zář", "Říj", "Lis", "Pro"], 12 | longhand: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"] 13 | }; 14 | 15 | flatpickr.l10ns.cs.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.cs.ordinal = function () { 18 | return "."; 19 | }; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ms.js: -------------------------------------------------------------------------------- 1 | /* Malaysian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ms = {}; 4 | 5 | flatpickr.l10ns.ms.weekdays = { 6 | shorthand: ["Min", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"], 7 | longhand: ["Minggu", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"] 8 | }; 9 | 10 | flatpickr.l10ns.ms.months = { 11 | shorthand: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], 12 | longhand: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"] 13 | }; 14 | 15 | flatpickr.l10ns.ms.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.ms.ordinal = function () { 18 | return ""; 19 | }; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/id.js: -------------------------------------------------------------------------------- 1 | /* Indonesian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.id = {}; 4 | 5 | flatpickr.l10ns.id.weekdays = { 6 | shorthand: ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], 7 | longhand: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"] 8 | }; 9 | 10 | flatpickr.l10ns.id.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"], 12 | longhand: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"] 13 | }; 14 | 15 | flatpickr.l10ns.id.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.id.ordinal = function () { 18 | return ""; 19 | }; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/zh.js: -------------------------------------------------------------------------------- 1 | /* Mandarin locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.zh = {}; 4 | 5 | flatpickr.l10ns.zh.weekdays = { 6 | shorthand: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], 7 | longhand: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"] 8 | }; 9 | 10 | flatpickr.l10ns.zh.months = { 11 | shorthand: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 12 | longhand: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] 13 | }; 14 | 15 | flatpickr.l10ns.zh.rangeSeparator = " 至 "; 16 | flatpickr.l10ns.zh.weekAbbreviation = "周"; 17 | flatpickr.l10ns.zh.scrollTitle = "滚动切换"; 18 | flatpickr.l10ns.zh.toggleTitle = "点击切换 12/24 小时时制"; 19 | 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/es.js: -------------------------------------------------------------------------------- 1 | /* Spanish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.es = {}; 4 | 5 | flatpickr.l10ns.es.weekdays = { 6 | shorthand: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], 7 | longhand: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"] 8 | }; 9 | 10 | flatpickr.l10ns.es.months = { 11 | shorthand: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], 12 | longhand: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"] 13 | }; 14 | 15 | flatpickr.l10ns.es.ordinal = function () { 16 | return "º"; 17 | }; 18 | 19 | flatpickr.l10ns.es.firstDayOfWeek = 1; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/my.js: -------------------------------------------------------------------------------- 1 | /* Burmese locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.my = {}; 4 | 5 | flatpickr.l10ns.my.weekdays = { 6 | shorthand: ["နွေ", "လာ", "ဂါ", "ဟူး", "ကြာ", "သော", "နေ"], 7 | longhand: ["တနင်္ဂနွေ", "တနင်္လာ", "အင်္ဂါ", "ဗုဒ္ဓဟူး", "ကြာသပတေး", "သောကြာ", "စနေ"] 8 | }; 9 | 10 | flatpickr.l10ns.my.months = { 11 | shorthand: ["ဇန်", "ဖေ", "မတ်", "ပြီ", "မေ", "ဇွန်", "လိုင်", "သြ", "စက်", "အောက်", "နို", "ဒီ"], 12 | longhand: ["ဇန်နဝါရီ", "ဖေဖော်ဝါရီ", "မတ်", "ဧပြီ", "မေ", "ဇွန်", "ဇူလိုင်", "သြဂုတ်", "စက်တင်ဘာ", "အောက်တိုဘာ", "နိုဝင်ဘာ", "ဒီဇင်ဘာ"] 13 | }; 14 | 15 | flatpickr.l10ns.my.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.my.ordinal = function () { 18 | return ""; 19 | }; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/ro.js: -------------------------------------------------------------------------------- 1 | /* Romanian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.ro = {}; 4 | 5 | flatpickr.l10ns.ro.weekdays = { 6 | shorthand: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sam"], 7 | longhand: ["Duminică", "Luni", "Marți", "Miercuri", "Joi", "Vineri", "Sâmbătă"] 8 | }; 9 | 10 | flatpickr.l10ns.ro.months = { 11 | shorthand: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Noi", "Dec"], 12 | longhand: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"] 13 | }; 14 | 15 | flatpickr.l10ns.ro.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.ro.ordinal = function () { 18 | return ""; 19 | }; 20 | 21 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/mk.js: -------------------------------------------------------------------------------- 1 | /* Macedonian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.mk = {}; 4 | 5 | flatpickr.l10ns.mk.weekdays = { 6 | shorthand: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са", "Не"], 7 | longhand: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота", "Недела"] 8 | }; 9 | 10 | flatpickr.l10ns.mk.months = { 11 | shorthand: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], 12 | longhand: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"] 13 | }; 14 | 15 | flatpickr.l10ns.mk.firstDayOfWeek = 1; 16 | flatpickr.l10ns.mk.weekAbbreviation = "Нед."; 17 | flatpickr.l10ns.mk.rangeSeparator = " до "; 18 | 19 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/sk.js: -------------------------------------------------------------------------------- 1 | /* Slovak locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.sk = {}; 4 | 5 | flatpickr.l10ns.sk.weekdays = { 6 | shorthand: ["Ned", "Pon", "Ut", "Str", "Štv", "Pia", "Sob"], 7 | longhand: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"] 8 | }; 9 | 10 | flatpickr.l10ns.sk.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], 12 | longhand: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"] 13 | }; 14 | 15 | flatpickr.l10ns.sk.firstDayOfWeek = 1; 16 | flatpickr.l10ns.sk.rangeSeparator = " do "; 17 | flatpickr.l10ns.sk.ordinal = function () { 18 | return "."; 19 | }; 20 | 21 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/sr.js: -------------------------------------------------------------------------------- 1 | /* Serbian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.sr = {}; 4 | 5 | flatpickr.l10ns.sr.weekdays = { 6 | shorthand: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub", "Ned"], 7 | longhand: ["Nedelja", "Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota", "Nedelja"] 8 | }; 9 | 10 | flatpickr.l10ns.sr.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], 12 | longhand: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"] 13 | }; 14 | 15 | flatpickr.l10ns.sr.firstDayOfWeek = 1; 16 | flatpickr.l10ns.sr.weekAbbreviation = "Ned."; 17 | flatpickr.l10ns.sr.rangeSeparator = " do "; 18 | 19 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/fi.js: -------------------------------------------------------------------------------- 1 | /* Finnish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.fi = {}; 4 | 5 | flatpickr.l10ns.fi.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.fi.weekdays = { 8 | shorthand: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"], 9 | longhand: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"] 10 | }; 11 | 12 | flatpickr.l10ns.fi.months = { 13 | shorthand: ["Tammi", "Helmi", "Maalis", "Huhti", "Touko", "Kesä", "Heinä", "Elo", "Syys", "Loka", "Marras", "Joulu"], 14 | longhand: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"] 15 | }; 16 | 17 | flatpickr.l10ns.fi.ordinal = function () { 18 | return "."; 19 | }; 20 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/sv.js: -------------------------------------------------------------------------------- 1 | /* Swedish locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.sv = {}; 4 | 5 | flatpickr.l10ns.sv.firstDayOfWeek = 1; 6 | flatpickr.l10ns.sv.weekAbbreviation = "v"; 7 | 8 | flatpickr.l10ns.sv.weekdays = { 9 | shorthand: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"], 10 | longhand: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"] 11 | }; 12 | 13 | flatpickr.l10ns.sv.months = { 14 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], 15 | longhand: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"] 16 | }; 17 | 18 | flatpickr.l10ns.sv.ordinal = function () { 19 | return "."; 20 | }; 21 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/sl.js: -------------------------------------------------------------------------------- 1 | /* Slovenian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.sl = {}; 4 | 5 | flatpickr.l10ns.sl.weekdays = { 6 | shorthand: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"], 7 | longhand: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"] 8 | }; 9 | 10 | flatpickr.l10ns.sl.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], 12 | longhand: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"] 13 | }; 14 | 15 | flatpickr.l10ns.sl.firstDayOfWeek = 1; 16 | flatpickr.l10ns.sl.rangeSeparator = " do "; 17 | flatpickr.l10ns.sl.ordinal = function () { 18 | return "."; 19 | }; 20 | 21 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/de.js: -------------------------------------------------------------------------------- 1 | /* German locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.de = {}; 4 | 5 | flatpickr.l10ns.de.weekdays = { 6 | shorthand: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 7 | longhand: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"] 8 | }; 9 | 10 | flatpickr.l10ns.de.months = { 11 | shorthand: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], 12 | longhand: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"] 13 | }; 14 | 15 | flatpickr.l10ns.de.firstDayOfWeek = 1; 16 | flatpickr.l10ns.de.weekAbbreviation = "KW"; 17 | flatpickr.l10ns.de.rangeSeparator = " bis "; 18 | flatpickr.l10ns.de.scrollTitle = "Zum Ändern scrollen"; 19 | flatpickr.l10ns.de.toggleTitle = "Zum Umschalten klicken"; 20 | 21 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/it.js: -------------------------------------------------------------------------------- 1 | /* Italian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.it = {}; 4 | 5 | flatpickr.l10ns.it.weekdays = { 6 | shorthand: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], 7 | longhand: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"] 8 | }; 9 | 10 | flatpickr.l10ns.it.months = { 11 | shorthand: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], 12 | longhand: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"] 13 | }; 14 | 15 | flatpickr.l10ns.it.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.it.ordinal = "°"; 18 | 19 | flatpickr.l10ns.it.weekAbbreviation = "Se"; 20 | 21 | flatpickr.l10ns.it.scrollTitle = "Scrolla per aumentare"; 22 | 23 | flatpickr.l10ns.it.toggleTitle = "Clicca per cambiare"; 24 | 25 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/hu.js: -------------------------------------------------------------------------------- 1 | /* Hungarian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.hu = {}; 4 | 5 | flatpickr.l10ns.hu.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.hu.weekdays = { 8 | shorthand: ["V", "H", "K", "Sz", "Cs", "P", "Szo"], 9 | longhand: ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat"] 10 | }; 11 | 12 | flatpickr.l10ns.hu.months = { 13 | shorthand: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Szep", "Okt", "Nov", "Dec"], 14 | longhand: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"] 15 | }; 16 | 17 | flatpickr.l10ns.hu.ordinal = function () { 18 | return "."; 19 | }; 20 | 21 | flatpickr.l10ns.hu.weekAbbreviation = "Hét"; 22 | flatpickr.l10ns.hu.scrollTitle = "Görgessen"; 23 | flatpickr.l10ns.hu.toggleTitle = "Kattintson a váltáshoz"; 24 | 25 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/th.js: -------------------------------------------------------------------------------- 1 | /* Thai locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.th = {}; 4 | 5 | flatpickr.l10ns.th.weekdays = { 6 | shorthand: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"], 7 | longhand: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัสบดี", "ศุกร์", "เสาร์"] 8 | }; 9 | 10 | flatpickr.l10ns.th.months = { 11 | shorthand: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], 12 | longhand: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"] 13 | }; 14 | 15 | flatpickr.l10ns.th.firstDayOfWeek = 1; 16 | flatpickr.l10ns.th.rangeSeparator = " ถึง "; 17 | flatpickr.l10ns.th.scrollTitle = "เลื่อนเพื่อเพิ่มหรือลด"; 18 | flatpickr.l10ns.th.toggleTitle = "คลิกเพื่อเปลี่ยน"; 19 | 20 | flatpickr.l10ns.th.ordinal = function () { 21 | return ""; 22 | }; 23 | 24 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | sudo: required 4 | 5 | cache: 6 | directories: 7 | - $HOME/.composer/cache 8 | 9 | php: 10 | - 7.0 11 | - 7.1 12 | 13 | services: 14 | - mysql 15 | - postgresql 16 | 17 | env: 18 | global: 19 | - MOODLE_BRANCH=MOODLE_36_STABLE 20 | matrix: 21 | - DB=pgsql 22 | - DB=mysqli 23 | 24 | before_install: 25 | - phpenv config-rm xdebug.ini 26 | - cd ../.. 27 | - composer selfupdate 28 | - composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2 29 | - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" 30 | 31 | install: 32 | - moodle-plugin-ci install 33 | 34 | script: 35 | # - moodle-plugin-ci phplint 36 | # - moodle-plugin-ci phpcpd 37 | # - moodle-plugin-ci phpmd 38 | # - moodle-plugin-ci codechecker 39 | # - moodle-plugin-ci csslint 40 | # - moodle-plugin-ci shifter 41 | # - moodle-plugin-ci jshint 42 | - moodle-plugin-ci validate 43 | - moodle-plugin-ci phpunit 44 | - moodle-plugin-ci behat 45 | -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/no.js: -------------------------------------------------------------------------------- 1 | /* Norwegian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.no = {}; 4 | 5 | flatpickr.l10ns.no.weekdays = { 6 | shorthand: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"], 7 | longhand: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] 8 | }; 9 | 10 | flatpickr.l10ns.no.months = { 11 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], 12 | longhand: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"] 13 | }; 14 | 15 | flatpickr.l10ns.no.firstDayOfWeek = 1; 16 | flatpickr.l10ns.no.rangeSeparator = " til "; 17 | flatpickr.l10ns.no.weekAbbreviation = "Uke"; 18 | flatpickr.l10ns.no.scrollTitle = "Scroll for å endre"; 19 | flatpickr.l10ns.no.toggleTitle = "Klikk for å veksle"; 20 | 21 | flatpickr.l10ns.no.ordinal = function () { 22 | return "."; 23 | }; 24 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/lt.js: -------------------------------------------------------------------------------- 1 | /* Lithuanian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.lt = {}; 4 | 5 | flatpickr.l10ns.lt.weekdays = { 6 | shorthand: ["S", "Pr", "A", "T", "K", "Pn", "Š"], 7 | longhand: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"] 8 | }; 9 | 10 | flatpickr.l10ns.lt.months = { 11 | shorthand: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rgp", "Rgs", "Spl", "Lap", "Grd"], 12 | longhand: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"] 13 | }; 14 | 15 | flatpickr.l10ns.lt.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.lt.ordinal = function () { 18 | return "-a"; 19 | }; 20 | 21 | flatpickr.l10ns.lt.weekAbbreviation = "Sav"; 22 | flatpickr.l10ns.lt.scrollTitle = "Keisti laiką pelės rateliu"; 23 | flatpickr.l10ns.lt.toggleTitle = "Perjungti laiko formatą"; 24 | 25 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/et.js: -------------------------------------------------------------------------------- 1 | /* Estonian locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.et = {}; 4 | 5 | flatpickr.l10ns.et.weekdays = { 6 | shorthand: ["P", "E", "T", "K", "N", "R", "L"], 7 | longhand: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"] 8 | }; 9 | 10 | flatpickr.l10ns.et.months = { 11 | shorthand: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], 12 | longhand: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"] 13 | }; 14 | 15 | flatpickr.l10ns.et.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.et.ordinal = function () { 18 | return "."; 19 | }; 20 | 21 | flatpickr.l10ns.et.weekAbbreviation = "Näd"; 22 | flatpickr.l10ns.et.rangeSeparator = " kuni "; 23 | flatpickr.l10ns.et.scrollTitle = "Keri, et suurendada"; 24 | flatpickr.l10ns.et.toggleTitle = "Klõpsa, et vahetada"; 25 | 26 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/eo.js: -------------------------------------------------------------------------------- 1 | /* Esperanto locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.eo = {}; 4 | 5 | flatpickr.l10ns.eo.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.eo.rangeSeparator = " ĝis "; 8 | flatpickr.l10ns.eo.weekAbbreviation = "Sem"; 9 | flatpickr.l10ns.eo.scrollTitle = "Rulumu por pligrandigi la valoron"; 10 | flatpickr.l10ns.eo.toggleTitle = "Klaku por ŝalti"; 11 | 12 | flatpickr.l10ns.eo.weekdays = { 13 | shorthand: ["Dim", "Lun", "Mar", "Mer", "Ĵaŭ", "Ven", "Sab"], 14 | longhand: ["dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"] 15 | }; 16 | 17 | flatpickr.l10ns.eo.months = { 18 | shorthand: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aŭg", "Sep", "Okt", "Nov", "Dec"], 19 | longhand: ["januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"] 20 | }; 21 | 22 | flatpickr.l10ns.eo.ordinal = function () { 23 | return "-a"; 24 | }; 25 | 26 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/cat.js: -------------------------------------------------------------------------------- 1 | /* Catalan locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.cat = {}; 4 | 5 | flatpickr.l10ns.cat.weekdays = { 6 | shorthand: ["Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"], 7 | longhand: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"] 8 | }; 9 | 10 | flatpickr.l10ns.cat.months = { 11 | shorthand: ["Gen", "Febr", "Març", "Abr", "Maig", "Juny", "Jul", "Ag", "Set", "Oct", "Nov", "Des"], 12 | longhand: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"] 13 | }; 14 | 15 | flatpickr.l10ns.cat.ordinal = function (nth) { 16 | var s = nth % 100; 17 | if (s > 3 && s < 21) return "è"; 18 | switch (s % 10) { 19 | case 1: 20 | return "r"; 21 | case 2: 22 | return "n"; 23 | case 3: 24 | return "r"; 25 | case 4: 26 | return "t"; 27 | default: 28 | return "è"; 29 | } 30 | }; 31 | 32 | flatpickr.l10ns.cat.firstDayOfWeek = 1; 33 | 34 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /templates/student_badges_courses_field.mustache: -------------------------------------------------------------------------------- 1 | {{#courses}} 2 | 3 | {{name}}: 4 | 5 | {{^bydate}} 6 | {{!-- Completion state --}} 7 | 8 | {{#str}}completion, local_intelliboard{{/str}} - {{completion}} 10 | {{/bydate}} 11 | 12 | {{!-- Grade --}} 13 | {{#grade}} 14 | 15 | {{#str}}grade, local_intelliboard{{/str}} {{grade}}/{{requiredgrade}} 17 | {{/grade}} 18 | 19 | {{!-- Completion date --}} 20 | {{#bydate}} 21 | 22 | {{#str}}completion, local_intelliboard{{/str}} {{bydate}}/{{requiredbydate}} 24 | {{/bydate}} 25 | 26 |
27 | {{/courses}} -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/fr.js: -------------------------------------------------------------------------------- 1 | /* French locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.fr = {}; 4 | 5 | flatpickr.l10ns.fr.firstDayOfWeek = 1; 6 | 7 | flatpickr.l10ns.fr.weekdays = { 8 | shorthand: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], 9 | longhand: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] 10 | }; 11 | 12 | flatpickr.l10ns.fr.months = { 13 | shorthand: ["Janv", "Févr", "Mars", "Avr", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"], 14 | longhand: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"] 15 | }; 16 | 17 | flatpickr.l10ns.fr.ordinal = function (nth) { 18 | if (nth > 1) return "ème"; 19 | 20 | return "er"; 21 | }; 22 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; 23 | 24 | flatpickr.l10ns.fr.rangeSeparator = " au "; 25 | flatpickr.l10ns.fr.weekAbbreviation = "Sem"; 26 | flatpickr.l10ns.fr.scrollTitle = "Défiler pour augmenter la valeur"; 27 | flatpickr.l10ns.fr.toggleTitle = "Cliquer pour basculer"; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | IntelliBoard plugin 2 | ================== 3 | 4 | Information 5 | ----------- 6 | 7 | To use this plugin, please register at www.intelliboard.net and follow instructions in the Settings page. 8 | IntelliBoard.net is built to work with any LMS designed in Moodle with the goal to deliver educational 9 | data analytics to single dashboard instantly. With power to turn this analytical data into simple and easy 10 | to read reports, IntelliBoard.net will become your primary reporting tool. 11 | 12 | To disable/hide SQL reports please use config - $CFG->intelliboardsql = false; 13 | 14 | 15 | Installation 16 | ----------- 17 | 1. Download the plugin from https://github.com/intelliboard/intelliboard 18 | 2. Install the plugin as local plugin 19 | 3. Enable web services in your Moodle 20 | 4. Enable REST/SOAP protocol in your Moodle 21 | 5. Add authorized users to use IntelliBoard.net web service 22 | 6. Create new token for your authorized user. Make sure IntelliBoard.net service is selected. 23 | 7. Login to IntelliBoard.net 24 | 8. Go to Settings - Servers - Add Moodle Connection 25 | 9. Enter requested information 26 | -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/nl.js: -------------------------------------------------------------------------------- 1 | /* Dutch locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.nl = {}; 4 | 5 | flatpickr.l10ns.nl.weekdays = { 6 | shorthand: ["zo", "ma", "di", "wo", "do", "vr", "za"], 7 | longhand: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"] 8 | }; 9 | 10 | flatpickr.l10ns.nl.months = { 11 | shorthand: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sept", "okt", "nov", "dec"], 12 | longhand: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"] 13 | }; 14 | 15 | flatpickr.l10ns.nl.firstDayOfWeek = 1; 16 | flatpickr.l10ns.nl.weekAbbreviation = "wk"; 17 | flatpickr.l10ns.nl.rangeSeparator = " tot "; 18 | flatpickr.l10ns.nl.scrollTitle = "Scroll voor volgende / vorige"; 19 | flatpickr.l10ns.nl.toggleTitle = "Klik om te wisselen"; 20 | 21 | flatpickr.l10ns.nl.ordinal = function (nth) { 22 | if (nth === 1 || nth === 8 || nth >= 20) return "ste"; 23 | 24 | return "de"; 25 | }; 26 | 27 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/gr.js: -------------------------------------------------------------------------------- 1 | /* Greek locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.gr = {}; 4 | 5 | flatpickr.l10ns.gr.weekdays = { 6 | shorthand: ["Κυ", "Δε", "Τρ", "Τε", "Πέ", "Πα", "Σά"], 7 | longhand: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"] 8 | }; 9 | 10 | flatpickr.l10ns.gr.months = { 11 | shorthand: ["Ιαν", "Φεβ", "Μάρ", "Απρ", "Μάι", "Ιού", "Ιού", "Αύγ", "Σεπ", "Οκτ", "Νοέ", "Δεκ"], 12 | longhand: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"] 13 | }; 14 | 15 | flatpickr.l10ns.gr.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.gr.ordinal = function () { 18 | return ""; 19 | }; 20 | 21 | flatpickr.l10ns.gr.weekAbbreviation = "Εβδ"; 22 | flatpickr.l10ns.gr.rangeSeparator = " έως "; 23 | flatpickr.l10ns.gr.scrollTitle = "Μετακυλήστε για προσαύξηση"; 24 | flatpickr.l10ns.gr.toggleTitle = "Κάντε κλικ για αλλαγή"; 25 | 26 | flatpickr.l10ns.gr.am = "ΠΜ"; 27 | flatpickr.l10ns.gr.pm = "ΜΜ"; 28 | 29 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /views/footer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | ?> 27 | 30 | -------------------------------------------------------------------------------- /db/caches.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | $definitions = [ 27 | 'bb_collaborate_access_token' => [ 28 | 'mode' => cache_store::MODE_APPLICATION 29 | ] 30 | ]; -------------------------------------------------------------------------------- /classes/attendance/OAuthException.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance; 27 | 28 | class OAuthException extends \Exception { 29 | // pass 30 | } -------------------------------------------------------------------------------- /db/messages.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2018 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | $messageproviders = array ( 27 | 28 | // checkout notification 29 | 'intelliboard_notification' => array ( 30 | ), 31 | 32 | 33 | ); 34 | -------------------------------------------------------------------------------- /classes/attendance/reports/attendance_report_interface.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | interface attendance_report_interface { 29 | public static function get_data($params); 30 | } -------------------------------------------------------------------------------- /version.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | $plugin->version = 2019101503; 28 | $plugin->requires = 2011120500; 29 | $plugin->release = '6.0.0'; 30 | $plugin->maturity = MATURITY_STABLE; 31 | $plugin->component = 'local_intelliboard'; 32 | -------------------------------------------------------------------------------- /search/src/Helpers/FunctionHelper.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Helpers; 27 | 28 | class FunctionHelper { 29 | 30 | public static function is_anonym_function($f) { 31 | return is_object($f) && ($f instanceof \Closure); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/cy.js: -------------------------------------------------------------------------------- 1 | /* Welsh locals for flatpickr */ 2 | var flatpickr = flatpickr || { l10ns: {} }; 3 | flatpickr.l10ns.cy = {}; 4 | 5 | flatpickr.l10ns.cy.weekdays = { 6 | shorthand: ["Sul", "Llun", "Maw", "Mer", "Iau", "Gwe", "Sad"], 7 | longhand: ["Dydd Sul", "Dydd Llun", "Dydd Mawrth", "Dydd Mercher", "Dydd Iau", "Dydd Gwener", "Dydd Sadwrn"] 8 | }; 9 | 10 | flatpickr.l10ns.cy.months = { 11 | shorthand: ["Ion", "Chwef", "Maw", "Ebr", "Mai", "Meh", "Gorff", "Awst", "Medi", "Hyd", "Tach", "Rhag"], 12 | longhand: ["Ionawr", "Chwefror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorffennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"] 13 | }; 14 | 15 | flatpickr.l10ns.cy.firstDayOfWeek = 1; 16 | 17 | flatpickr.l10ns.cy.ordinal = function (nth) { 18 | if (nth === 1) return "af"; 19 | 20 | if (nth === 2) return "ail"; 21 | 22 | if (nth === 3 || nth === 4) return "ydd"; 23 | 24 | if (nth === 5 || nth === 6) return "ed"; 25 | 26 | if (nth >= 7 && nth <= 10 || nth == 12 || nth == 15 || nth == 18 || nth == 20) return "fed"; 27 | 28 | if (nth == 11 || nth == 13 || nth == 14 || nth == 16 || nth == 17 || nth == 19) return "eg"; 29 | 30 | if (nth >= 21 && nth <= 39) return "ain"; 31 | 32 | // Inconclusive. 33 | return ""; 34 | }; 35 | 36 | if (typeof module !== "undefined") module.exports = flatpickr.l10ns; -------------------------------------------------------------------------------- /classes/attendance/OAuthSignatureMethod.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance; 27 | 28 | class OAuthSignatureMethod { 29 | public function check_signature(&$request, $consumer, $token, $signature) { 30 | $built = $this->build_signature($request, $consumer, $token); 31 | return $built == $signature; 32 | } 33 | } -------------------------------------------------------------------------------- /classes/tools/lti_tool.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\tools; 27 | 28 | use local_intelliboard\services\lti_service; 29 | 30 | class lti_tool { 31 | /** 32 | * Get lti service 33 | * 34 | * @return lti_service 35 | * @throws \dml_exception 36 | */ 37 | public static function service() { 38 | return new lti_service(); 39 | } 40 | } -------------------------------------------------------------------------------- /views/export_filter.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2019 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | 27 | $formats = ['xls', 'csv', 'pdf'];?> 28 |
29 | 30 | 32 | 33 | 34 | 35 |
36 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | $config = []; 28 | $config['app_url'] = 'https://app.intelliboard.net/'; 29 | $config['app_url_api'] = 'https://api.intelliboard.net/'; 30 | $config['app_url_us'] = 'https://us-app.intelliboard.net/'; 31 | $config['app_url_eu'] = 'https://eu-app.intelliboard.net/'; 32 | $config['app_url_au'] = 'https://au-app.intelliboard.net/'; 33 | $config['app_url_ca'] = 'https://ca-app.intelliboard.net/'; 34 | -------------------------------------------------------------------------------- /amd/src/intelliboard.js: -------------------------------------------------------------------------------- 1 | // This file is part of Moodle - http://moodle.org/ 2 | // 3 | // Moodle is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | // 8 | // Moodle is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Moodle. If not, see . 15 | 16 | /** 17 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 18 | * 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website https://intelliboard.net/ 24 | */ 25 | 26 | define(['jquery', 'local_intelliboard/intb_circlechart'], function($, circleChart) { 27 | let Intelliboard = { 28 | circleProgress: function(options) { 29 | options = JSON.parse(options); 30 | $(document).ready(function(){ 31 | $('.circle-progress').percentcircle(options); 32 | }); 33 | } 34 | }; 35 | 36 | return Intelliboard; 37 | }); -------------------------------------------------------------------------------- /search/src/Helpers/ArrayHelper.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Helpers; 27 | 28 | class ArrayHelper { 29 | 30 | 31 | public static function is_indexed_array($array) { 32 | 33 | if (!is_array($array)) { 34 | return false; 35 | } 36 | 37 | foreach ($array as $key => $value) { 38 | if (!is_numeric($key)) return false; 39 | } 40 | return true; 41 | 42 | } 43 | } -------------------------------------------------------------------------------- /classes/repositories/modules_repository.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2019 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | namespace local_intelliboard\repositories; 28 | 29 | class modules_repository 30 | { 31 | public static function getAllModules($showInvisible = false) { 32 | global $DB; 33 | 34 | $condifitons = []; 35 | 36 | if(!$showInvisible) { 37 | $condifitons['visible'] = 1; 38 | } 39 | 40 | return $DB->get_records('modules', $condifitons); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /classes/attendance/OAuthConsumer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance; 27 | 28 | class OAuthConsumer { 29 | public $key; 30 | public $secret; 31 | 32 | function __construct($key, $secret, $callback_url = null) { 33 | $this->key = $key; 34 | $this->secret = $secret; 35 | $this->callback_url = $callback_url; 36 | } 37 | 38 | function __toString() { 39 | return "OAuthConsumer[key=$this->key,secret=$this->secret]"; 40 | } 41 | } -------------------------------------------------------------------------------- /search/src/Containers/BaseContainer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Containers; 27 | 28 | use DataExtractor; 29 | 30 | abstract class BaseContainer { 31 | 32 | public static abstract function get($entities, DataExtractor $extractor, $params = array()); 33 | public static abstract function construct($entities, DataExtractor $extractor, $params = array()); 34 | 35 | public static function release($entities, DataExtractor $extractor, $params = array()) 36 | { 37 | $entities = static::get($entities, $extractor, $params); 38 | return static::construct($entities, $extractor, $params); 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /classes/attendance/reports/lateness_percent_table.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class lateness_percent_table implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | if(!$params['users']) { 33 | return []; 34 | } 35 | 36 | $userFilter = $DB->get_in_or_equal($params['users']); 37 | 38 | return $DB->get_records_sql( 39 | "SELECT u.* 40 | FROM {user} u 41 | WHERE u.id {$userFilter[0]}", 42 | $userFilter[1] 43 | ); 44 | } 45 | } -------------------------------------------------------------------------------- /amd/build/intb_circlechart.min.js: -------------------------------------------------------------------------------- 1 | define(["jquery"],function(a){(function(a){a.fn.extend({percentcircle:function(b){var c={animate:!0,diameter:100,guage:2,coverBg:"#fff",bgColor:"#efefef",fillColor:"#5c93c8",percentSize:"15px",percentWeight:"normal"};c=a.extend(c,b);var d={cirContainer:{width:c.diameter,height:c.diameter},cir:{position:"relative","text-align":"center",width:c.diameter,height:c.diameter,"border-radius":"100%","background-color":c.bgColor,"background-image":"linear-gradient(91deg, transparent 50%, "+c.bgColor+" 50%), linear-gradient(90deg, "+c.bgColor+" 50%, transparent 50%)"},cirCover:{position:"relative",top:c.guage,left:c.guage,"text-align":"center",width:c.diameter-2*c.guage,height:c.diameter-2*c.guage,"border-radius":"100%","background-color":c.coverBg},percent:{display:"block",width:c.diameter,height:c.diameter,"line-height":c.diameter+"px","vertical-align":"middle","font-size":c.percentSize,"font-weight":c.percentWeight,color:c.fillColor}},e=this,f=function(a,b,d){var e=b;b<=a&&(180<=e?d.css("background-image","linear-gradient("+(90+e)+"deg, transparent 50%, "+c.fillColor+" 50%),linear-gradient(90deg, "+c.fillColor+" 50%, transparent 50%)"):d.css("background-image","linear-gradient("+(e-90)+"deg, transparent 50%, "+c.bgColor+" 50%),linear-gradient(90deg, "+c.fillColor+" 50%, transparent 50%)"),b++,setTimeout(function(){f(a,b,d)},1))};(function(){e.each(function(){var b=a(this),e=b.data("percent"),g=Math.round(e),h=3.6*g,i=c.animate?0:h,j=a("
{{percentage}}
".replace("{{percentage}}",isNaN(e)?e:Math.max(e,g)+"%"));j.css(d.cirContainer).find(".ab").css(d.cir).find(".cir").css(d.cirCover).find(".perc").css(d.percent),b.append(j),setTimeout(function(){f(h,parseInt(i),j.find(".ab"))},250)})})()}})})(a)}); -------------------------------------------------------------------------------- /search/src/Containers/HavingsContainer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Containers; 27 | 28 | use DataExtractor; 29 | 30 | class HavingsContainer extends BaseContainer { 31 | 32 | static protected $conjunctions; 33 | static protected $mode = DataExtractor::MYSQL_MODE; 34 | 35 | public static function init($mode) {} 36 | 37 | public static function get($selected, DataExtractor $extractor, $params = array()) { 38 | static::init($extractor->getMode()); 39 | 40 | return FiltersContainer::get($selected, $extractor, $params, true); 41 | } 42 | 43 | public static function construct($havings, DataExtractor $extractor, $params = array()) { 44 | return FiltersContainer::construct($havings, $extractor, $params); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /tests/local_intelliboard_tracking_test.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | /** 30 | * Class within phpunit tests 31 | * @group local_intelliboard 32 | */ 33 | class local_intelliboard_tracking_testcase extends advanced_testcase 34 | { 35 | 36 | public function test_tracking() 37 | { 38 | global $DB, $CFG; 39 | 40 | $this->resetAfterTest(true); 41 | 42 | $user = $this->getDataGenerator()->create_user(); 43 | $this->setUser($user); 44 | 45 | require_once($CFG->dirroot .'/local/intelliboard/lib.php'); 46 | 47 | //$result = local_intelliboard_insert_tracking(false); 48 | //$this->assertEquals(true, $result); 49 | 50 | $this->setGuestUser(); 51 | //$result = local_intelliboard_insert_tracking(false); 52 | //$this->assertEquals(false, $result); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /db/tasks.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_bbbreport 22 | * @copyright 2018 Sebale 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | $tasks = [ 30 | [ 31 | 'classname' => 'local_intelliboard\task\check_active_bbb_meetings', 32 | 'blocking' => 0, 33 | 'minute' => '*', 34 | 'hour' => '*', 35 | 'day' => '*', 36 | 'month' => '*', 37 | 'dayofweek' => '*' 38 | ], 39 | [ 40 | 'classname' => 'local_intelliboard\task\check_active_bb_collaborate_meetings', 41 | 'blocking' => 0, 42 | 'minute' => '*', 43 | 'hour' => '*', 44 | 'day' => '*', 45 | 'month' => '*', 46 | 'dayofweek' => '*' 47 | ], 48 | [ 49 | 'classname' => 'local_intelliboard\task\attendance_sync', 50 | 'blocking' => 0, 51 | 'minute' => '*', 52 | 'hour' => '*', 53 | 'day' => '*', 54 | 'month' => '*', 55 | 'dayofweek' => '*' 56 | ] 57 | ]; -------------------------------------------------------------------------------- /search/src/autoload.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | /** 27 | * Function for class auto loading 28 | * 29 | * @param string $class Class name for required class 30 | * @return bool A status indicating that class has been loaded or not 31 | */ 32 | 33 | spl_autoload_register(function($class) { 34 | 35 | $baseDir = __DIR__; 36 | $path = $baseDir . '/' . str_replace('\\', '/', $class) . '.php'; 37 | if (file_exists($path)) { 38 | require_once($path); 39 | return true; 40 | } 41 | 42 | return false; 43 | 44 | }); 45 | 46 | function d($arg, $stop = true, $backtrace = false) { 47 | 48 | print "
";
49 |     print "Debug info:";
50 |     var_dump($arg);
51 |     print "
"; 52 | 53 | if ($backtrace) { 54 | debug_print_backtrace(); 55 | } 56 | if ($stop) { 57 | die(); 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /classes/output/renderer.php: -------------------------------------------------------------------------------- 1 | . 14 | 15 | namespace local_intelliboard\output; 16 | defined('MOODLE_INTERNAL') || die; 17 | 18 | use plugin_renderer_base; 19 | 20 | /** 21 | * Renderer file. 22 | * 23 | * @package local_intelliboard 24 | * @author Intelliboard 25 | * @copyright 2019 26 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL 27 | */ 28 | 29 | /** 30 | * Standard HTML output renderer for intelliboard 31 | */ 32 | class renderer extends plugin_renderer_base { 33 | /** 34 | * Constructor method, calls the parent constructor 35 | * 36 | * @param \moodle_page $page 37 | * @param string $target one of rendering target constants 38 | */ 39 | public function __construct(\moodle_page $page, $target) { 40 | parent::__construct($page, $target); 41 | } 42 | 43 | /** 44 | * Return the dashboard content for the intellicart. 45 | * 46 | * @param student_menu $studentmenu 47 | * @return string HTML string 48 | * @throws \coding_exception 49 | * @throws \dml_exception 50 | * @throws \moodle_exception 51 | */ 52 | public function render_student_menu(student_menu $studentmenu) { 53 | return $this->render_from_template( 54 | 'local_intelliboard/student_menu', $studentmenu->export_for_template($this) 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /sqlreports.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2018 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../config.php'); 28 | require_once($CFG->libdir.'/adminlib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 30 | require_once($CFG->dirroot . '/local/intelliboard/output/tables/reports_table.php'); 31 | 32 | require_login(); 33 | admin_externalpage_setup('intelliboardsql'); 34 | 35 | if (!is_siteadmin()) { 36 | throw new moodle_exception('invalidaccess', 'error'); 37 | } 38 | if (isset($CFG->intelliboardsql) and $CFG->intelliboardsql == false) { 39 | throw new moodle_exception('invalidaccess', 'error'); 40 | } 41 | 42 | $intelliboard = intelliboard(['task'=>'sqlreports']); 43 | 44 | $table = new reports_table('reports_table'); 45 | $table->show_download_buttons_at(array()); 46 | $table->is_downloading(false); 47 | $table->is_collapsible = false; 48 | 49 | echo $OUTPUT->header(); 50 | 51 | echo $OUTPUT->heading(get_string('sqlreports', 'local_intelliboard')); 52 | 53 | $table->out(20, true); 54 | 55 | echo $OUTPUT->footer(); 56 | -------------------------------------------------------------------------------- /classes/attendance/OAuthSignatureMethod_HMAC_SHA1.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance; 27 | 28 | class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod { 29 | function get_name() { 30 | return "HMAC-SHA1"; 31 | } 32 | 33 | public function build_signature($request, $consumer, $token) { 34 | global $oauth_last_computed_signature; 35 | $oauth_last_computed_signature = false; 36 | 37 | $base_string = $request->get_signature_base_string(); 38 | $request->base_string = $base_string; 39 | 40 | $key_parts = array( 41 | $consumer->secret, 42 | ($token) ? $token->secret : "" 43 | ); 44 | 45 | $key_parts = OAuthUtil::urlencode_rfc3986($key_parts); 46 | $key = implode('&', $key_parts); 47 | 48 | $computed_signature = base64_encode(hash_hmac('sha1', $base_string, $key, true)); 49 | $oauth_last_computed_signature = $computed_signature; 50 | return $computed_signature; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /search/src/Containers/GroupsContainer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Containers; 27 | 28 | use DataExtractor; 29 | 30 | class GroupsContainer extends BaseContainer{ 31 | 32 | public static function get($selected, DataExtractor $extractor, $params = array()) { 33 | $mode = $extractor->getMode(); 34 | 35 | return array_map(function($group) use ($extractor, $mode) { 36 | 37 | if (empty($group['name'])) { 38 | $column = ColumnsContainer::get($group, $extractor)['sql']; 39 | $group['name'] = $column; 40 | } else { 41 | $group['name'] = is_numeric($group['name'])? ColumnsContainer::getById($group['name'], $extractor)['name'] : $group['name']; 42 | } 43 | 44 | return $group['name']; 45 | 46 | }, $selected); 47 | } 48 | 49 | public static function construct($groups, DataExtractor $extractor, $params = array()) { 50 | return implode(',' . $extractor->getSeparator() . ' ', $groups) . $extractor->getSeparator(); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /views/report44.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | ?> 27 | 44 | -------------------------------------------------------------------------------- /attendance/launch.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | require_once("../../../config.php"); 27 | require_once($CFG->dirroot.'/local/intelliboard/attendance/attendancelib.php'); 28 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 29 | 30 | $sesskey = required_param('sesskey', PARAM_TEXT); 31 | $courseid = optional_param('course_id', 0, PARAM_INT); 32 | 33 | require_login(); 34 | 35 | if(!get_config('local_intelliboard', 'enableattendance') or $sesskey !== sesskey()){ 36 | throw new moodle_exception('invalidaccess', 'error'); 37 | } 38 | 39 | $params = array( 40 | 'do'=>'learner', 41 | 'mode'=> 1 42 | ); 43 | $intelliboard = intelliboard($params); 44 | 45 | if(!isset($intelliboard) || !$intelliboard->token) { 46 | echo sprintf( 47 | '', 48 | get_string('intelliboardaccess', 'local_intelliboard') 49 | ); 50 | echo $OUTPUT->footer(); 51 | exit; 52 | } 53 | 54 | $context = context_system::instance(); 55 | 56 | $ltiservice = \local_intelliboard\tools\lti_tool::service(); 57 | list($endpoint, $parms) = $ltiservice->lti_get_launch_data( 58 | ['course_id' => $courseid] 59 | ); 60 | 61 | $content = lti_post_launch_html($parms, $endpoint); 62 | 63 | echo $content; -------------------------------------------------------------------------------- /assets/css/pdf.css: -------------------------------------------------------------------------------- 1 | html{height:100%;} 2 | body{min-height:100%;margin:0;padding:0;padding-bottom:0;font-family: Arial; font-size: 0.9em; color:#000;} 3 | a,img{text-decoration:none;border:0px;text-decoration:none;color: #5209EF;transition: color 0.2s linear 0s;} 4 | h1{color: #A3A3A3;font-size: 2em;margin: 0 0 1em;} 5 | h2{color: #464646;font-size: 1.5em;margin-bottom:1em;} 6 | p{margin-bottom:1em;} 7 | fieldset{border:0;} 8 | table{padding:0;margin:0;border-collapse: collapse;} 9 | table tr td{padding:0;border-collapse: collapse; vertical-align:top;} 10 | .watermark{position:absolute;top:0; right:0; font-family:arial;font-size:7pt;} 11 | .title{text-align:center;margin-bottom:2pt; font-family:arial;font-weight:bold; font-size:16pt;} 12 | .info{text-align:center;margin-bottom:12pt; font-family:arial;font-size:12pt;color:#666;} 13 | .desc{text-align:left; color:#000; font-size:10pt;margin-top:0;margin-bottom:3pt;} 14 | strong{color:#000;} 15 | table{width:100%;border-collapse: collapse; border:none; margin-top:20pt;} 16 | table tr.odd td{background-color: #F7F6F3;} 17 | table tr td{border:0.5pt solid #999;padding:2pt; font-size:9pt;font-family:arial; text-align:center} 18 | table tr th{border:none;padding:2pt; font-family:arial;font-weight:bold; font-size:8pt; text-align:center} 19 | .header tr td{border:none;padding-left:10px;} 20 | 21 | /*analytic 5*/ 22 | .quiz-grade{margin-bottom: 10px;} 23 | .grades-chart{padding-top:15px;border-bottom: 1px solid #ddd;padding-bottom: 15px;border-top: 1px solid #ddd;} 24 | /*.grades-chart .chart-info{float:left;width:25%;} 25 | .grades-chart .chart-info h4{font-size: 16px;font-weight: 400;margin: 0;padding-left:10px;} 26 | .grades-chart .chart-info p{padding:0 10px;font-size:12px;} 27 | .grades-chart .chart{float:left;width:75%;}*/ 28 | .grades-chart .chart{width:100%;} 29 | .grades-chart .chart #grade-dist{width:100%;height:250px;} 30 | .grades-chart .chart .chart-description h4{font-size: 16px;font-weight: 400;margin: 0;} 31 | .grades-chart .chart .chart-description p{font-size:12px;} 32 | .questions-details{margin-top:15px;padding:0 12px;} 33 | .questions-details h3{border-bottom:1px solid #ddd;margin: 0 0 10px;padding: 0 10px 10px;} 34 | 35 | .avgbox{ display: inline-block;width: 32%;margin: 0.5%;} 36 | .chart-first{ display: inline-block;width: 48%;margin-right: 2%;} 37 | .chart{ display: inline-block;width: 48%;} 38 | 39 | -------------------------------------------------------------------------------- /assets/js/flatpickr_l10n/index.js: -------------------------------------------------------------------------------- 1 | var ar = require("./ar")["ar"]; 2 | var bg = require("./bg")["bg"]; 3 | var bn = require("./bn")["bn"]; 4 | var cat = require("./cat")["cat"]; 5 | var cs = require("./cs")["cs"]; 6 | var cy = require("./cy")["cy"]; 7 | var da = require("./da")["da"]; 8 | var de = require("./de")["de"]; 9 | var eo = require("./eo")["eo"]; 10 | var es = require("./es")["es"]; 11 | var et = require("./et")["et"]; 12 | var fa = require("./fa")["fa"]; 13 | var fi = require("./fi")["fi"]; 14 | var fr = require("./fr")["fr"]; 15 | var gr = require("./gr")["gr"]; 16 | var he = require("./he")["he"]; 17 | var hi = require("./hi")["hi"]; 18 | var hr = require("./hr")["hr"]; 19 | var hu = require("./hu")["hu"]; 20 | var id = require("./id")["id"]; 21 | var it = require("./it")["it"]; 22 | var ja = require("./ja")["ja"]; 23 | var ko = require("./ko")["ko"]; 24 | var lt = require("./lt")["lt"]; 25 | var lv = require("./lv")["lv"]; 26 | var mk = require("./mk")["mk"]; 27 | var ms = require("./ms")["ms"]; 28 | var my = require("./my")["my"]; 29 | var nl = require("./nl")["nl"]; 30 | var no = require("./no")["no"]; 31 | var pa = require("./pa")["pa"]; 32 | var pl = require("./pl")["pl"]; 33 | var pt = require("./pt")["pt"]; 34 | var ro = require("./ro")["ro"]; 35 | var ru = require("./ru")["ru"]; 36 | var si = require("./si")["si"]; 37 | var sk = require("./sk")["sk"]; 38 | var sl = require("./sl")["sl"]; 39 | var sq = require("./sq")["sq"]; 40 | var sr = require("./sr")["sr"]; 41 | var sv = require("./sv")["sv"]; 42 | var th = require("./th")["th"]; 43 | var tr = require("./tr")["tr"]; 44 | var uk = require("./uk")["uk"]; 45 | var vn = require("./vn")["vn"]; 46 | var zh = require("./zh")["zh"]; 47 | 48 | var l10n = { 49 | ar: ar, 50 | bg: bg, 51 | bn: bn, 52 | cat: cat, 53 | cs: cs, 54 | cy: cy, 55 | da: da, 56 | de: de, 57 | eo: eo, 58 | es: es, 59 | et: et, 60 | fa: fa, 61 | fi: fi, 62 | fr: fr, 63 | gr: gr, 64 | he: he, 65 | hi: hi, 66 | hr: hr, 67 | hu: hu, 68 | id: id, 69 | it: it, 70 | ja: ja, 71 | ko: ko, 72 | lt: lt, 73 | lv: lv, 74 | mk: mk, 75 | ms: ms, 76 | my: my, 77 | nl: nl, 78 | no: no, 79 | pa: pa, 80 | pl: pl, 81 | pt: pt, 82 | ro: ro, 83 | ru: ru, 84 | si: si, 85 | sk: sk, 86 | sl: sl, 87 | sq: sq, 88 | sr: sr, 89 | sv: sv, 90 | th: th, 91 | tr: tr, 92 | uk: uk, 93 | vn: vn, 94 | zh: zh 95 | }; 96 | 97 | if (typeof module !== "undefined") module.exports = l10n; -------------------------------------------------------------------------------- /db/events.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | 27 | 28 | $observers = [ 29 | array( 30 | 'eventname' => '\core\event\role_assigned', 31 | 'callback' => 'local_intelliboard_observer::role_assigned', 32 | ), 33 | array( 34 | 'eventname' => '\mod_forum\event\post_created', 35 | 'callback' => 'local_intelliboard_observer::post_created', 36 | ), 37 | array( 38 | 'eventname' => '\core\event\role_unassigned', 39 | 'callback' => 'local_intelliboard_observer::role_unassigned', 40 | ), 41 | array( 42 | 'eventname' => '\core\event\user_graded', 43 | 'callback' => 'local_intelliboard_observer::user_graded', 44 | ), 45 | array( 46 | 'eventname' => '\mod_quiz\event\attempt_submitted', 47 | 'callback' => 'local_intelliboard_observer::quiz_attempt_submitted', 48 | ), 49 | array( 50 | 'eventname' => '\mod_assign\event\assessable_submitted', 51 | 'callback' => 'local_intelliboard_observer::assign_attempt_submitted', 52 | ), 53 | array( 54 | 'eventname' => 'core\event\user_loggedin', 55 | 'callback' => 'local_intelliboard_observer::user_loggedin', 56 | ), 57 | array( 58 | 'eventname' => 'core\event\user_enrolment_created', 59 | 'callback' => 'local_intelliboard_observer::user_enrolment_created', 60 | ), 61 | ]; 62 | -------------------------------------------------------------------------------- /classes/attendance/reports/persistent_absence.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class persistent_absence implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $studentroles = explode( 33 | ',', get_config('local_intelliboard', 'filter11') 34 | ); 35 | 36 | if(!$params['users'] or !$studentroles) { 37 | return []; 38 | } 39 | 40 | $studentrolefilter = $DB->get_in_or_equal( 41 | $studentroles, SQL_PARAMS_NAMED, 'role' 42 | ); 43 | 44 | $userFilter = $DB->get_in_or_equal( 45 | $params['users'], SQL_PARAMS_NAMED, 'user' 46 | ); 47 | 48 | return $DB->get_records_sql( 49 | "SELECT u.id, u.firstname, u.lastname, COUNT(DISTINCT ra.contextid) as student_courses 50 | FROM {user} u 51 | JOIN {role_assignments} ra ON ra.userid = u.id AND 52 | ra.roleid {$studentrolefilter[0]} 53 | JOIN {context} cx ON cx.id = ra.contextid AND 54 | cx.contextlevel = :cxcourse 55 | WHERE u.id {$userFilter[0]} 56 | GROUP BY u.id, u.firstname, u.lastname", 57 | ['cxcourse' => CONTEXT_COURSE] + $userFilter[1] + $studentrolefilter[1] 58 | ); 59 | } 60 | } -------------------------------------------------------------------------------- /search/src/Helpers/ParamGetter.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Helpers; 27 | 28 | class ParamGetter { 29 | 30 | private $columns = array(); 31 | private $tables = array(); 32 | private $filters = array(); 33 | private $params = array(); 34 | 35 | private static $paramCount = 0; 36 | 37 | public function add($type, $data) 38 | { 39 | if (isset($this->$type) && !in_array($data, $this->$type)) { 40 | $array = &$this->$type; 41 | $array[] = $data; 42 | } 43 | return $this; 44 | } 45 | 46 | public function release() { 47 | $sql = 'SELECT ' . implode(',', $this->columns); 48 | $sql .= ' FROM ' . implode(' ', $this->tables); 49 | 50 | if ($this->filters) { 51 | $sql .= ' WHERE ' . implode(' AND ', $this->filters); 52 | } 53 | 54 | return array('sql' => $sql, 'params' => $this->params); 55 | } 56 | 57 | public function setParam($name, $value) { 58 | $this->params[$name] = $value; 59 | } 60 | 61 | public static function in_sql(ParamGetter $getter, $type, $filter, $params) 62 | { 63 | $filter .= ' IN('; 64 | foreach($params as $value) { 65 | $param = 'inparam' . self::$paramCount; 66 | $filter .= ':' . $param . ','; 67 | $getter->setParam($param, $value); 68 | self::$paramCount++; 69 | } 70 | 71 | $filter = rtrim($filter, ',') . ')'; 72 | 73 | $getter->add($type, $filter); 74 | } 75 | 76 | } -------------------------------------------------------------------------------- /competencies/views/menu.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | $id = optional_param('id', 0, PARAM_RAW); 28 | ?> 29 | 51 | -------------------------------------------------------------------------------- /amd/src/instructor.js: -------------------------------------------------------------------------------- 1 | // This file is part of Moodle - http://moodle.org/ 2 | // 3 | // Moodle is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | // 8 | // Moodle is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Moodle. If not, see . 15 | 16 | /** 17 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 18 | * 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website https://intelliboard.net/ 24 | */ 25 | 26 | define(['jquery', 'core/ajax', 'local_intelliboard/intb_multipleselect'], function($, ajax, multipleselect) { 27 | let Instructor = { 28 | /** 29 | * Modal window for settings of instructor dashboard 30 | */ 31 | dashboardSettings: function(selectCoursesString) { 32 | let select = $('.instructor-courses-settings'); 33 | let wrapper = $('.instructor-dashboard-settings-wrapper'); 34 | 35 | select.multipleSelect({ 36 | multiple: true, 37 | placeholder: selectCoursesString, 38 | multipleWidth: 350, 39 | filter: true 40 | }); 41 | 42 | wrapper.find('.ms-drop.bottom').append( 43 | '' 44 | ); 45 | 46 | wrapper.find('.ms-drop.bottom button').on('click', function() { 47 | let selectedCourses = select.val(); 48 | 49 | if(selectedCourses == null) { 50 | selectedCourses = []; 51 | } 52 | 53 | let saveCoursesPromises = ajax.call([ 54 | { 55 | methodname: 'local_intelliboard_save_instructor_courses', args: { 56 | data: JSON.stringify({courses: selectedCourses}) 57 | } 58 | }, 59 | ]); 60 | 61 | saveCoursesPromises[0].done(function(response) { 62 | window.location.reload(); 63 | }); 64 | }); 65 | } 66 | }; 67 | 68 | return Instructor; 69 | }); -------------------------------------------------------------------------------- /output/forms/local_intelliboard_sqlreport.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2018 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | require_once($CFG->dirroot . '/lib/formslib.php'); 30 | 31 | class local_intelliboard_sqlreport_form extends moodleform { 32 | 33 | function definition() { 34 | global $CFG, $DB; 35 | 36 | $mform = $this->_form; 37 | $data = $this->_customdata['data']; 38 | $data->sqlcode = base64_decode($data->sqlcode); 39 | 40 | $mform->addElement('header', 'general', get_string('sqlreport', 'local_intelliboard')); 41 | 42 | $mform->addElement('text', 'name', get_string('sqlreportname', 'local_intelliboard')); 43 | $mform->setType('name', PARAM_RAW); 44 | 45 | $mform->addElement('textarea', 'sqlcode', get_string('sqlreportcode', 'local_intelliboard'), ['readonly'=>true]); 46 | $mform->setType('sqlcode', PARAM_RAW); 47 | 48 | $options = [ 49 | get_string('sqlreportinactive', 'local_intelliboard'), 50 | get_string('sqlreportactive', 'local_intelliboard'), 51 | ]; 52 | $mform->addElement('select', 'status', get_string('status', 'local_intelliboard'), $options); 53 | 54 | $mform->addElement('hidden', 'id'); 55 | $mform->setType('id', PARAM_INT); 56 | 57 | $this->add_action_buttons(); 58 | $this->set_data($data); 59 | } 60 | 61 | /** 62 | * Some basic validation 63 | * 64 | * @param $data 65 | * @param $files 66 | * @return array 67 | */ 68 | public function validation($data, $files) { 69 | $errors = parent::validation($data, $files); 70 | 71 | return $errors; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /classes/tools/bb_collaborate_tool.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\tools; 27 | 28 | use local_intelliboard\bb_collaborate\bb_collaborate_adapter; 29 | use local_intelliboard\services\bb_collaborate_service; 30 | use local_intelliboard\bb_collaborate\bb_collaborate_repository; 31 | 32 | class bb_collaborate_tool { 33 | /** 34 | * Get BB collaborate service 35 | * 36 | * @return bb_collaborate_service 37 | */ 38 | public static function service() { 39 | return new bb_collaborate_service(); 40 | } 41 | 42 | /** 43 | * Get BB collaborate adapter 44 | * 45 | * @return bb_collaborate_adapter 46 | * @throws \dml_exception 47 | */ 48 | public static function adapter() { 49 | return new bb_collaborate_adapter( 50 | new bb_collaborate_service(), new bb_collaborate_repository() 51 | ); 52 | } 53 | 54 | /** 55 | * Get BB collaborate repository 56 | * 57 | * @return bb_collaborate_repository 58 | */ 59 | public static function repository() { 60 | return new bb_collaborate_repository(); 61 | } 62 | 63 | /** 64 | * Convert server time to UTC 65 | * 66 | * @param $timestamp 67 | * @return false|int 68 | */ 69 | public static function server_time_to_utc($timestamp) { 70 | $utctimezone = 'UTC'; 71 | $serverTimezoneName = (new \DateTime())->getTimezone()->getName(); 72 | 73 | $strTimestamp = date('Y-m-d H:i', $timestamp); 74 | $serverDatetime = new \DateTime( 75 | $strTimestamp, new \DateTimeZone($serverTimezoneName) 76 | ); 77 | $serverDatetime->setTimezone(new \DateTimeZone($utctimezone)); 78 | return strtotime($serverDatetime->format('Y-m-d H:i')); 79 | } 80 | } -------------------------------------------------------------------------------- /classes/attendance/reports/perfect_attendance.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class perfect_attendance implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $studentroles = explode( 33 | ',', get_config('local_intelliboard', 'filter11') 34 | ); 35 | 36 | if(!$params['users'] or !$studentroles) { 37 | return []; 38 | } 39 | 40 | $studentrolefilter = $DB->get_in_or_equal( 41 | $studentroles, SQL_PARAMS_NAMED, 'role' 42 | ); 43 | 44 | $userFilter = $DB->get_in_or_equal( 45 | $params['users'], SQL_PARAMS_NAMED, 'user' 46 | ); 47 | 48 | return $DB->get_records_sql( 49 | "SELECT u.id, u.firstname, u.lastname, COUNT(DISTINCT ra.contextid) as student_courses, 50 | (SELECT AVG(gg.finalgrade) 51 | FROM {grade_grades} gg 52 | JOIN {grade_items} gi ON gi.id = gg.itemid AND 53 | gi.itemtype = 'course' 54 | WHERE gg.userid = u.id 55 | GROUP BY u.id 56 | ) as avg_grade 57 | FROM {user} u 58 | JOIN {role_assignments} ra ON ra.userid = u.id AND 59 | ra.roleid {$studentrolefilter[0]} 60 | JOIN {context} cx ON cx.id = ra.contextid AND 61 | cx.contextlevel = :cxcourse 62 | WHERE u.id {$userFilter[0]} 63 | GROUP BY u.id, u.firstname, u.lastname", 64 | ['cxcourse' => CONTEXT_COURSE] + $userFilter[1] + $studentrolefilter[1] 65 | ); 66 | } 67 | } -------------------------------------------------------------------------------- /search/src/Containers/OrdersContainer.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Containers; 27 | 28 | use DataExtractor; 29 | 30 | class OrdersContainer extends BaseContainer { 31 | 32 | public static function get($selected, DataExtractor $extractor, $params = array()) { 33 | $directions = array( 34 | 1 => array( 35 | DataExtractor::MYSQL_MODE => 'ASC', 36 | DataExtractor::POSTGRES_MODE => 'ASC NULLS FIRST' 37 | ), 38 | 2 => array( 39 | DataExtractor::MYSQL_MODE => 'DESC', 40 | DataExtractor::POSTGRES_MODE => 'DESC NULLS LAST' 41 | ) 42 | ); 43 | 44 | $mode = $extractor->getMode(); 45 | 46 | $directions = array_map(function($direction) use ($mode) { 47 | if (is_array($direction)) { 48 | $direction = $direction[$mode]; 49 | } 50 | return $direction; 51 | }, $directions); 52 | 53 | return array_map(function($order) use ($directions, $extractor) { 54 | 55 | if (empty($order['name'])) { 56 | $column = ColumnsContainer::get($order, $extractor)['sql']; 57 | $order['name'] = $column; 58 | } 59 | 60 | $order['direction'] = isset($order['direction'])? $directions[$order['direction']] : $directions[1]; 61 | 62 | return $order; 63 | }, $selected); 64 | 65 | } 66 | 67 | public static function construct($orders, DataExtractor $extractor, $params = array()) { 68 | return implode(',' . $extractor->getSeparator() . ' ' . $extractor->getSeparator(), array_map(function($order) { 69 | return $order['name'] . ' ' . $order['direction']; 70 | }, $orders)); 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /classes/bb_collaborate/session_attendances.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\bb_collaborate; 27 | 28 | class session_attendances { 29 | /** @var string */ 30 | const STATUS_ABSENCE = 'absence'; 31 | 32 | /** @var string */ 33 | const STATUS_LATE = 'late'; 34 | 35 | /** @var string */ 36 | const STATUS_PRESENT = 'present'; 37 | 38 | /** @var array */ 39 | private $data; 40 | 41 | private $session; 42 | 43 | /** 44 | * Array (response data from BB collaborate server) 45 | * /sessions/%s/instances/%s/attendees 46 | * 47 | * session_attendances constructor. 48 | * @param array $data 49 | */ 50 | public function __construct($session, $data) { 51 | $this->data = $data; 52 | $this->session = $session; 53 | } 54 | 55 | /** 56 | * Get attendances 57 | * 58 | * @return array 59 | */ 60 | public function get_attendances() { 61 | return $this->data; 62 | } 63 | 64 | /** 65 | * Get user status in session 66 | * 67 | * @param $userid 68 | * @return bool 69 | */ 70 | public function get_status($userid) { 71 | $status = self::STATUS_ABSENCE; 72 | 73 | foreach($this->data as $item) { 74 | if($item['externalUserId'] == $userid) { 75 | $joins = array_map(function($join) { 76 | return strtotime($join['joined']); 77 | }, $item['attendance']); 78 | $firstjoin = min($joins); 79 | 80 | if($firstjoin <= $this->session->timestart) { 81 | $status = self::STATUS_PRESENT; 82 | } else { 83 | $status = self::STATUS_LATE; 84 | } 85 | break; 86 | } 87 | } 88 | 89 | return $status; 90 | } 91 | } -------------------------------------------------------------------------------- /instructor/monitors.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../../config.php'); 28 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/instructor/lib.php'); 30 | 31 | 32 | $set = optional_param('id', 0, PARAM_RAW); 33 | 34 | require_login(); 35 | intelliboard_instructor_access(); 36 | $params = http_build_query(['userid'=>$USER->id ]); 37 | 38 | 39 | $intelliboard = intelliboard(['task'=>'monitors', 'mode'=> 2]); 40 | 41 | $PAGE->set_url(new moodle_url("/local/intelliboard/instructor/monitors.php")); 42 | $PAGE->set_pagetype('monitors'); 43 | $PAGE->set_pagelayout('report'); 44 | $PAGE->set_context(context_system::instance()); 45 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 46 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 47 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 48 | echo $OUTPUT->header(); 49 | ?> 50 |
51 | 52 |
53 | alerts): ?> 54 | alerts as $text => $alert): ?> 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 |
63 |
64 | 65 |
66 | footer(); 68 | -------------------------------------------------------------------------------- /classes/attendance/reports/attendance_ytd_table.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class attendance_ytd_table implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $order = ''; 33 | $where = 'c.id <> 1'; 34 | $sqlparams = ['coursecx' => CONTEXT_COURSE]; 35 | $studentroles = explode( 36 | ',', get_config('local_intelliboard', 'filter11') 37 | ); 38 | 39 | if(!$studentroles) { 40 | return []; 41 | } 42 | 43 | $studentrolefilter = $DB->get_in_or_equal( 44 | $studentroles, SQL_PARAMS_NAMED, 'role' 45 | ); 46 | $sqlparams += $studentrolefilter[1]; 47 | 48 | if($params['order']) { 49 | $order = "ORDER BY {$params['order']['field']} {$params['order']['dir']}"; 50 | } 51 | 52 | if(isset($params['courses']) && $params['courses']) { 53 | $coursefilter = $DB->get_in_or_equal( 54 | $params['courses'], SQL_PARAMS_NAMED, 'course' 55 | ); 56 | $where .= " AND c.id {$coursefilter[0]}"; 57 | $sqlparams += $coursefilter[1]; 58 | } 59 | 60 | return $DB->get_records_sql( 61 | "SELECT c.id, c.fullname as course, 62 | COUNT(DISTINCT ra.userid) as number_of_enrollments 63 | FROM {course} c 64 | JOIN {context} cx ON cx.instanceid = c.id AND 65 | cx.contextlevel = :coursecx 66 | LEFT JOIN {role_assignments} ra ON ra.contextid = cx.id AND 67 | ra.roleid {$studentrolefilter[0]} 68 | WHERE {$where} 69 | GROUP BY c.id {$order}", 70 | $sqlparams, 71 | $params['offset'], $params['limit'] 72 | ); 73 | } 74 | } -------------------------------------------------------------------------------- /db/access.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | $capabilities = array( 30 | 'local/intelliboard:students' => array( 31 | 'captype' => 'read', 32 | 'contextlevel' => CONTEXT_SYSTEM, 33 | 'archetypes' => array( 34 | 'guest' => CAP_ALLOW, 35 | 'user' => CAP_ALLOW, 36 | 'frontpage' => CAP_ALLOW, 37 | 'student' => CAP_ALLOW, 38 | 'teacher' => CAP_PROHIBIT, 39 | 'editingteacher' => CAP_PROHIBIT, 40 | 'coursecreator' => CAP_PROHIBIT, 41 | 'manager' => CAP_PROHIBIT 42 | ) 43 | ), 44 | 'local/intelliboard:instructors' => array( 45 | 'captype' => 'read', 46 | 'contextlevel' => CONTEXT_COURSE, 47 | 'archetypes' => array( 48 | 'teacher' => CAP_ALLOW, 49 | 'editingteacher' => CAP_ALLOW, 50 | 'coursecreator' => CAP_ALLOW, 51 | 'manager' => CAP_ALLOW 52 | ), 53 | ), 54 | 'local/intelliboard:view' => array( 55 | 'captype' => 'write', 56 | 'contextlevel' => CONTEXT_SYSTEM, 57 | 'archetypes' => array( 58 | 'manager' => CAP_ALLOW 59 | ) 60 | ), 61 | 'local/intelliboard:manage' => array( 62 | 'captype' => 'write', 63 | 'contextlevel' => CONTEXT_SYSTEM, 64 | 'archetypes' => array( 65 | 'manager' => CAP_ALLOW 66 | ) 67 | ), 68 | 'local/intelliboard:competency' => array( 69 | 'captype' => 'write', 70 | 'contextlevel' => CONTEXT_SYSTEM, 71 | 'archetypes' => array( 72 | 'manager' => CAP_ALLOW 73 | ), 74 | ), 75 | 'local/intelliboard:attendanceadmin' => array( 76 | 'captype' => 'write', 77 | 'contextlevel' => CONTEXT_SYSTEM, 78 | 'archetypes' => array( 79 | 'manager' => CAP_ALLOW 80 | ), 81 | ) 82 | ); 83 | -------------------------------------------------------------------------------- /monitors.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../config.php'); 28 | require_once($CFG->libdir.'/adminlib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 30 | 31 | 32 | require_login(); 33 | require_capability('local/intelliboard:view', context_system::instance()); 34 | 35 | $set = optional_param('id', '', PARAM_RAW); 36 | $intelliboard = intelliboard(['task'=>'monitors']); 37 | 38 | $PAGE->set_url(new moodle_url("/local/intelliboard/monitors.php", array('id'=>$set))); 39 | $PAGE->set_pagelayout('report'); 40 | $PAGE->set_pagetype('monitors'); 41 | $PAGE->set_context(context_system::instance()); 42 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 43 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 44 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 45 | echo $OUTPUT->header(); 46 | ?> 47 |
48 | 49 |
50 | alerts): ?> 51 | alerts as $text => $alert): ?> 52 | 53 | 54 | 55 | 56 | 57 |
58 | 59 | 60 |
61 | 62 | 63 | 64 |
65 | 66 |
67 | footer(); 69 | -------------------------------------------------------------------------------- /classes/attendance/OAuthUtil.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance; 27 | 28 | class OAuthUtil { 29 | public static function urlencode_rfc3986($input) { 30 | if (is_array($input)) { 31 | return array_map(array( 32 | 'local_intelliboard\attendance\OAuthUtil', 33 | 'urlencode_rfc3986' 34 | ), $input); 35 | } else { 36 | if (is_scalar($input)) { 37 | return str_replace('+', ' ', str_replace('%7E', '~', rawurlencode($input))); 38 | } else { 39 | return ''; 40 | } 41 | } 42 | } 43 | 44 | public static function build_http_query($params) { 45 | if (!$params) { 46 | return ''; 47 | } 48 | 49 | // Urlencode both keys and values 50 | $keys = self::urlencode_rfc3986(array_keys($params)); 51 | $values = self::urlencode_rfc3986(array_values($params)); 52 | $params = array_combine($keys, $values); 53 | 54 | // Parameters are sorted by name, using lexicographical byte value ordering. 55 | // Ref: Spec: 9.1.1 (1) 56 | uksort($params, 'strcmp'); 57 | 58 | $pairs = array(); 59 | foreach ($params as $parameter => $value) { 60 | if (is_array($value)) { 61 | // If two or more parameters share the same name, they are sorted by their value 62 | // Ref: Spec: 9.1.1 (1) 63 | natsort($value); 64 | foreach ($value as $duplicate_value) { 65 | $pairs[] = $parameter . '=' . $duplicate_value; 66 | } 67 | } else { 68 | $pairs[] = $parameter . '=' . $value; 69 | } 70 | } 71 | // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61) 72 | // Each name-value pair is separated by an '&' character (ASCII code 38) 73 | return implode('&', $pairs); 74 | } 75 | } -------------------------------------------------------------------------------- /classes/attendance/reports/consecutive_absences.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class consecutive_absences implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $studentroles = explode( 33 | ',', get_config('local_intelliboard', 'filter11') 34 | ); 35 | $order = ''; 36 | 37 | if(!$params['users'] or !$studentroles) { 38 | return []; 39 | } 40 | 41 | $studentrolefilter = $DB->get_in_or_equal( 42 | $studentroles, SQL_PARAMS_NAMED, 'role' 43 | ); 44 | 45 | $userFilter = $DB->get_in_or_equal( 46 | $params['users'], SQL_PARAMS_NAMED, 'user' 47 | ); 48 | 49 | if($params['order']) { 50 | $order = "ORDER BY {$params['order']['field']} {$params['order']['dir']}"; 51 | } 52 | 53 | return $DB->get_records_sql( 54 | "SELECT u.id, CONCAT(u.firstname, ' ', u.lastname) as fullname, 55 | COUNT(DISTINCT ra.contextid) as student_courses, 56 | (SELECT AVG(gg.finalgrade) 57 | FROM {grade_grades} gg 58 | JOIN {grade_items} gi ON gi.id = gg.itemid AND 59 | gi.itemtype = 'course' 60 | WHERE gg.userid = u.id 61 | GROUP BY u.id 62 | ) as avg_grade 63 | FROM {user} u 64 | JOIN {role_assignments} ra ON ra.userid = u.id AND 65 | ra.roleid {$studentrolefilter[0]} 66 | JOIN {context} cx ON cx.id = ra.contextid AND 67 | cx.contextlevel = :cxcourse 68 | WHERE u.id {$userFilter[0]} 69 | GROUP BY u.id, fullname {$order}", 70 | ['cxcourse' => CONTEXT_COURSE] + $userFilter[1] + $studentrolefilter[1], 71 | $params['offset'], $params['limit'] 72 | ); 73 | } 74 | } -------------------------------------------------------------------------------- /output/tables/reports_table.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2018 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | 28 | defined('MOODLE_INTERNAL') || die(); 29 | 30 | require_once($CFG->libdir.'/tablelib.php'); 31 | 32 | class reports_table extends table_sql { 33 | function __construct($uniqueid) { 34 | global $PAGE, $DB; 35 | 36 | parent::__construct($uniqueid); 37 | 38 | $this->define_headers(array( 39 | get_string('sqlreportname', 'local_intelliboard'), 40 | get_string('status', 'local_intelliboard'), 41 | get_string('sqlreportdate', 'local_intelliboard'), 42 | get_string('actions', 'local_intelliboard') 43 | )); 44 | $this->define_columns(array('name', 'status', 'timecreated','actions')); 45 | 46 | $fields = "*, '' AS actions"; 47 | $from = "{local_intelliboard_reports}"; 48 | 49 | $this->set_sql($fields, $from, 'id > 0', []); 50 | $this->define_baseurl($PAGE->url); 51 | } 52 | 53 | function col_timecreated($values) { 54 | return date('m/d/Y',$values->timecreated); 55 | } 56 | 57 | function col_status($values) { 58 | return [ 59 | get_string('sqlreportinactive', 'local_intelliboard'), 60 | get_string('sqlreportactive', 'local_intelliboard'), 61 | ][$values->status]; 62 | } 63 | 64 | function col_actions($values) { 65 | global $CFG, $OUTPUT; 66 | 67 | $buttons = array(); 68 | 69 | $urlparams = array('id' => $values->id); 70 | 71 | 72 | $buttons[] = html_writer::link(new moodle_url($CFG->wwwroot.'/local/intelliboard/sqlreport.php', $urlparams), 73 | get_string('edit'), array('title' => get_string('edit'))); 74 | 75 | $buttons[] = html_writer::link(new moodle_url($CFG->wwwroot.'/local/intelliboard/sqlreport.php', $urlparams+array('delete'=>1)), 76 | get_string('delete'), array('title' => get_string('delete'))); 77 | 78 | 79 | return implode(' | ', $buttons); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /competencies/reports.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../../config.php'); 28 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/competencies/lib.php'); 30 | 31 | require_login(); 32 | intelliboard_competency_access(); 33 | 34 | if(!get_config('local_intelliboard', 'competency_reports')){ 35 | throw new moodle_exception('invalidaccess', 'error'); 36 | } 37 | 38 | $report = optional_param('id', '', PARAM_RAW); 39 | $intelliboard = intelliboard(['task'=>'reports', 'mode' => 3]); 40 | $params = http_build_query(['userid'=>$USER->id ]); 41 | $report_type = $intelliboard->reports[$report]->type; 42 | 43 | $PAGE->set_url(new moodle_url("/local/intelliboard/instructor/reports.php")); 44 | $PAGE->set_pagetype('reports'); 45 | $PAGE->set_pagelayout('report'); 46 | $PAGE->set_context(context_system::instance()); 47 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 48 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 49 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 50 | echo $OUTPUT->header(); 51 | ?> 52 |
53 | 54 |
55 | alerts): ?> 56 | alerts as $text => $alert): ?> 57 | 58 | 59 | 60 | 61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 | footer(); 70 | -------------------------------------------------------------------------------- /classes/tools/os_classifier.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\tools; 27 | 28 | class os_classifier { 29 | 30 | const TYPE_DESKTOP = 'desktop'; 31 | const TYPE_MOBILE = 'mobile'; 32 | const TYPE_OTHER = 'other'; 33 | 34 | private static $os = array( 35 | self::TYPE_DESKTOP => array( 36 | 'Windows 10', 37 | 'Windows 8.1', 38 | 'Windows 8', 39 | 'Windows 7', 40 | 'Windows Vista', 41 | 'Windows 2003', 42 | 'Windows XP', 43 | 'Windows 2000', 44 | 'Windows NT 4.0', 45 | 'Windows NT', 46 | 'Windows 98', 47 | 'Windows 95', 48 | 'Windows Phone', 49 | 'Unknown Windows OS', 50 | 'Mac OS X', 51 | 'Power PC Mac', 52 | 'ppc mac', 53 | 'freebsd', 54 | 'ppc', 55 | 'Macintosh', 56 | 'linux', 57 | 'debian', 58 | 'sunos', 59 | 'Sun Solaris', 60 | 'beos', 61 | 'GNU/Linux', 62 | 'gnu', 63 | 'unix', 64 | 'Unknown Unix OS', 65 | 'netbsd', 66 | 'bsdi', 67 | 'openbsd' 68 | ), 69 | self::TYPE_MOBILE => array( 70 | 'Android', 71 | 'IOS', 72 | 'iphone', 73 | 'ipad', 74 | 'ipod', 75 | 'BlackBerry', 76 | 'Symbian OS', 77 | 'symbian' 78 | ) 79 | ); 80 | 81 | public static function getOSType($required) { 82 | 83 | $required = strtolower($required); 84 | 85 | foreach (self::$os as $type => $osses) { 86 | 87 | foreach ($osses as $os) { 88 | 89 | if (strtolower($os) === $required) { 90 | return $type; 91 | } 92 | 93 | } 94 | 95 | } 96 | 97 | return self::TYPE_OTHER; 98 | 99 | } 100 | 101 | } -------------------------------------------------------------------------------- /classes/attendance/reports/attendance_report.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class attendance_report implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $order = ''; 33 | $where = 'u.id > 0'; 34 | $sqlparams = [ 35 | 'coursecxlvl' => CONTEXT_COURSE 36 | ]; 37 | $studentroles = explode( 38 | ',', get_config('local_intelliboard', 'filter11') 39 | ); 40 | 41 | if(!$studentroles) { 42 | return [ 43 | 'rows' => [], 'filteredRows' => 0 44 | ]; 45 | } 46 | 47 | $studentrolefilter = $DB->get_in_or_equal( 48 | $studentroles, SQL_PARAMS_NAMED, 'strole' 49 | ); 50 | $sqlparams += $studentrolefilter[1]; 51 | 52 | if($params['order']) { 53 | $order = "ORDER BY {$params['order']['field']} {$params['order']['dir']}"; 54 | } 55 | 56 | if($params['search']) { 57 | $where .= ' AND (' . $DB->sql_like( 58 | 'CONCAT(u.firstname, \' \', u.lastname)', ':search', false 59 | ); 60 | $where .= ' OR ' .$DB->sql_like( 61 | 'CONCAT(u.lastname, \' \', u.firstname)', ':search1', false 62 | ) . ')'; 63 | $sqlparams['search'] = "%{$params['search']}%"; 64 | $sqlparams['search1'] = "%{$params['search']}%"; 65 | } 66 | 67 | return $DB->get_records_sql( 68 | "SELECT DISTINCT u.id, CONCAT(u.firstname, ' ', u.lastname) as fullname, 69 | u.email 70 | FROM {user} u 71 | JOIN {context} cx ON cx.contextlevel = :coursecxlvl 72 | JOIN {role_assignments} ra ON ra.roleid {$studentrolefilter[0]} AND 73 | ra.userid = u.id AND 74 | ra.contextid = cx.id 75 | WHERE {$where} {$order}", 76 | $sqlparams, 77 | $params['offset'], $params['limit'] 78 | ); 79 | } 80 | } -------------------------------------------------------------------------------- /classes/task/check_active_bbb_meetings.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\task; 27 | 28 | /** 29 | * Task to process new created BBB meetings. 30 | * 31 | * @copyright 2018 Intelliboard 32 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 33 | */ 34 | class check_active_bbb_meetings extends \core\task\scheduled_task { 35 | 36 | /** 37 | * Get a descriptive name for this task (shown to admins). 38 | * 39 | * @return string 40 | */ 41 | public function get_name() { 42 | return get_string('check_active_meetings', 'local_intelliboard'); 43 | } 44 | 45 | /** 46 | * Do the job. 47 | * Throw exceptions on errors (the job will be retried). 48 | */ 49 | public function execute() { 50 | global $CFG; 51 | 52 | if(!get_config('local_intelliboard', 'enablebbbmeetings')) { 53 | return false; 54 | } 55 | 56 | $bbb = new \local_intelliboard\bbb_client(); 57 | $bbbmeetings = new \local_intelliboard\bbb_meetings(); 58 | // local meeting - meeting, which created from activity BugBlueButtonBN 59 | $localmeetings = $bbbmeetings->get_local_moodle_meetings(); 60 | 61 | $activemeetings = $bbb->getActiveMeetings(); 62 | /** 63 | * IDs of active Moodle meetings 64 | * Also meeting can be created from BBB interface. 65 | * We need only meetings, which created from Moodle 66 | */ 67 | $listofactivemeetingsids = []; 68 | 69 | /** Check active meetings */ 70 | foreach($activemeetings as $meeting) { 71 | // meeting ID without course id and cmid 72 | $puremeetingid = explode('-', $meeting->meetingID->__toString())[0]; 73 | 74 | // Skip if meeting not created from Moodle system 75 | if(!in_array($puremeetingid, $localmeetings)) { 76 | continue; 77 | } 78 | 79 | $listofactivemeetingsids[] = $meeting->meetingID->__toString(); 80 | $bbbmeetings->check_meeting($meeting); 81 | } 82 | 83 | /** Check stopped meetings */ 84 | $bbbmeetings->check_stopped_meetings($listofactivemeetingsids); 85 | } 86 | 87 | } -------------------------------------------------------------------------------- /instructor/reports.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../../config.php'); 28 | require_once('../locallib.php'); 29 | require_once('lib.php'); 30 | 31 | require_login(); 32 | intelliboard_instructor_access(); 33 | 34 | $report = optional_param('id', '', PARAM_RAW); 35 | $alias = optional_param('alias', '', PARAM_RAW); 36 | $intelliboard = intelliboard(['task'=>'reports', 'mode' => 2]); 37 | $params = http_build_query(['userid'=>$USER->id ]); 38 | 39 | if ($alias and !empty($intelliboard->reports)) { 40 | foreach($intelliboard->reports as $key=>$val) { 41 | if ($val->alias == $alias) { 42 | redirect(new moodle_url("/local/intelliboard/instructor/reports.php", array('id'=>$key))); 43 | break; 44 | } 45 | } 46 | } 47 | $report_type = isset($intelliboard->reports[$report]->type)?$intelliboard->reports[$report]->type:''; 48 | 49 | $PAGE->set_url(new moodle_url("/local/intelliboard/instructor/reports.php", array('id'=>$report))); 50 | $PAGE->set_pagetype('reports'); 51 | $PAGE->set_pagelayout('report'); 52 | $PAGE->set_context(context_system::instance()); 53 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 54 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 55 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 56 | echo $OUTPUT->header(); 57 | ?> 58 |
59 | 60 |
61 | alerts): ?> 62 | alerts as $text => $alert): ?> 63 | 64 | 65 | 66 | 67 |
68 | 69 | 70 |
71 |
72 | 73 |
74 | footer(); 76 | -------------------------------------------------------------------------------- /classes/attendance/reports/course_enrollments.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\attendance\reports; 27 | 28 | class course_enrollments implements attendance_report_interface { 29 | public static function get_data($params) { 30 | global $DB; 31 | 32 | $order = ''; 33 | $where = 'c.id <> 1'; 34 | $sqlparams = ['coursecx' => CONTEXT_COURSE]; 35 | $studentroles = explode( 36 | ',', get_config('local_intelliboard', 'filter11') 37 | ); 38 | 39 | if(!$studentroles) { 40 | return []; 41 | } 42 | 43 | $studentrolefilter = $DB->get_in_or_equal( 44 | $studentroles, SQL_PARAMS_NAMED, 'role' 45 | ); 46 | $sqlparams += $studentrolefilter[1]; 47 | 48 | if($params['order']) { 49 | $order = "ORDER BY {$params['order']['field']} {$params['order']['dir']}"; 50 | } 51 | 52 | if(isset($params['courses']) && $params['courses']) { 53 | $coursefilter = $DB->get_in_or_equal( 54 | $params['courses'], SQL_PARAMS_NAMED, 'course' 55 | ); 56 | $where .= " AND c.id {$coursefilter[0]}"; 57 | $sqlparams += $coursefilter[1]; 58 | } 59 | 60 | $courses = $DB->get_records_sql( 61 | "SELECT c.id, c.fullname as course, 62 | COUNT(DISTINCT ra.userid) as number_of_enrollments, 63 | CASE WHEN AVG(gg.finalgrade) IS NULL THEN 0 ELSE AVG(gg.finalgrade) END as avg_grade 64 | FROM {course} c 65 | JOIN {context} cx ON cx.instanceid = c.id AND 66 | cx.contextlevel = :coursecx 67 | LEFT JOIN {role_assignments} ra ON ra.contextid = cx.id AND 68 | ra.roleid {$studentrolefilter[0]} 69 | LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND 70 | gi.itemtype = 'course' 71 | LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id 72 | WHERE {$where} 73 | GROUP BY c.id {$order}", 74 | $sqlparams, 75 | $params['offset'], $params['limit'] 76 | ); 77 | 78 | foreach($courses as &$course) { 79 | $course->avg_grade = format_float($course->avg_grade); 80 | } 81 | 82 | return $courses; 83 | } 84 | } -------------------------------------------------------------------------------- /search/src/Helpers/PluralHelper.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace Helpers; 27 | 28 | class PluralHelper 29 | { 30 | static $plural = array( 31 | '/(quiz)$/i' => "$1zes", 32 | '/^(ox)$/i' => "$1en", 33 | '/([m|l])ouse$/i' => "$1ice", 34 | '/(matr|vert|ind)ix|ex$/i' => "$1ices", 35 | '/(x|ch|ss|sh)$/i' => "$1es", 36 | '/([^aeiouy]|qu)y$/i' => "$1ies", 37 | '/(hive)$/i' => "$1s", 38 | '/(?:([^f])fe|([lr])f)$/i' => "$1$2ves", 39 | '/(shea|lea|loa|thie)f$/i' => "$1ves", 40 | '/sis$/i' => "ses", 41 | '/([ti])um$/i' => "$1a", 42 | '/(tomat|potat|ech|her|vet)o$/i'=> "$1oes", 43 | '/(bu)s$/i' => "$1ses", 44 | '/(alias)$/i' => "$1es", 45 | '/(octop)us$/i' => "$1i", 46 | '/(ax|test)is$/i' => "$1es", 47 | '/(us)$/i' => "$1es", 48 | '/s$/i' => "s", 49 | '/$/' => "s" 50 | ); 51 | 52 | static $irregular = array( 53 | 'move' => 'moves', 54 | 'foot' => 'feet', 55 | 'goose' => 'geese', 56 | 'sex' => 'sexes', 57 | 'child' => 'children', 58 | 'man' => 'men', 59 | 'tooth' => 'teeth', 60 | 'person' => 'people', 61 | 'valve' => 'valves' 62 | ); 63 | 64 | static $uncountable = array( 65 | 'sheep', 66 | 'fish', 67 | 'deer', 68 | 'series', 69 | 'species', 70 | 'money', 71 | 'rice', 72 | 'information', 73 | 'equipment' 74 | ); 75 | 76 | public static function pluralize( $string ) 77 | { 78 | 79 | if ( in_array( strtolower( $string ), self::$uncountable ) ) 80 | return $string; 81 | 82 | foreach ( self::$irregular as $pattern => $result ) 83 | { 84 | $pattern = '/' . $pattern . '$/i'; 85 | 86 | if ( preg_match( $pattern, $string ) ) 87 | return preg_replace( $pattern, $result, $string); 88 | } 89 | 90 | foreach ( self::$plural as $pattern => $result ) 91 | { 92 | if ( preg_match( $pattern, $string ) ) 93 | return preg_replace( $pattern, $result, $string ); 94 | } 95 | 96 | return $string; 97 | } 98 | } -------------------------------------------------------------------------------- /classes/task/attendance_sync.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\task; 27 | 28 | use local_intelliboard\attendance\attendance_api; 29 | use local_intelliboard\tools\bb_collaborate_tool; 30 | 31 | /** 32 | * Task to sync data with attendance 33 | * 34 | * @copyright 2019 Intelliboard 35 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 36 | */ 37 | class attendance_sync extends \core\task\scheduled_task { 38 | /** 39 | * Get a descriptive name for this task (shown to admins). 40 | * 41 | * @return string 42 | * @throws \coding_exception 43 | */ 44 | public function get_name() { 45 | return get_string('sync_data_with_attendance', 'local_intelliboard'); 46 | } 47 | 48 | /** 49 | * Do the job. 50 | * Throw exceptions on errors (the job will be retried). 51 | * @return bool 52 | * @throws \dml_exception 53 | * @throws \moodle_exception 54 | * @throws \Exception 55 | */ 56 | public function execute() { 57 | if( 58 | !get_config('local_intelliboard', 'enable_bb_col_meetings') or 59 | !get_config('local_intelliboard', 'enablesyncattendance') 60 | ) { 61 | return false; 62 | } 63 | 64 | // Sync BlackBoard Collaborate sessions 65 | $repository = bb_collaborate_tool::repository(); 66 | $sessions = $repository->not_synchronized_sessions(); 67 | $attendanceapi = new attendance_api(); 68 | 69 | foreach($sessions as $session) { 70 | $session->timestart = date( 71 | 'c', $session->timestart 72 | ); 73 | $session->timeend = date( 74 | 'c', $session->timeend 75 | ); 76 | $session->external_session_type = 'bb_collaborate'; 77 | 78 | try { 79 | $response = json_decode( 80 | $attendanceapi->create_session((array) $session) 81 | ); 82 | } catch(\Exception $e) { 83 | if(get_config('local_intelliboard', 'bb_col_debug')) { 84 | var_dump($e); 85 | } 86 | continue; 87 | } 88 | 89 | if(isset($response->created) && $response->created) { 90 | bb_collaborate_tool::service()->mark_session_synchronized( 91 | $session->id, $response->instance_id 92 | ); 93 | } 94 | } 95 | 96 | return true; 97 | } 98 | 99 | } -------------------------------------------------------------------------------- /student/badges.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2019 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | 27 | use local_intelliboard\output\student_menu; 28 | use local_intelliboard\output\tables\student_badges; 29 | 30 | require('../../../config.php'); 31 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 32 | require_once($CFG->dirroot .'/local/intelliboard/student/lib.php'); 33 | require_once($CFG->dirroot .'/local/intelliboard/instructor/lib.php'); 34 | 35 | require_login(); 36 | require_capability('local/intelliboard:students', context_system::instance()); 37 | 38 | if(!get_config('local_intelliboard', 't1')){ 39 | throw new moodle_exception('invalidaccess', 'error'); 40 | }elseif(!get_config('local_intelliboard', 't2')){ 41 | if(get_config('local_intelliboard', 't3')){ 42 | redirect("$CFG->wwwroot/local/intelliboard/student/courses.php"); 43 | }if(get_config('local_intelliboard', 't4')){ 44 | redirect("$CFG->wwwroot/local/intelliboard/student/grades.php"); 45 | } 46 | throw new moodle_exception('invalidaccess', 'error'); 47 | } 48 | 49 | $PAGE->set_url(new moodle_url( 50 | "/local/intelliboard/student/badges.php", 51 | ["sesskey"=> sesskey()] 52 | )); 53 | $PAGE->set_pagetype('badges'); 54 | $PAGE->set_pagelayout('report'); 55 | $PAGE->set_context(context_system::instance()); 56 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 57 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 58 | $PAGE->requires->jquery(); 59 | $PAGE->requires->js('/local/intelliboard/assets/js/jquery.circlechart.js'); 60 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 61 | 62 | $params = array( 63 | 'do'=>'learner', 64 | 'mode'=> 1 65 | ); 66 | $intelliboard = intelliboard($params); 67 | $renderer = $PAGE->get_renderer('local_intelliboard'); 68 | $studentmenurenderable = new student_menu( 69 | ['intelliboard' => $intelliboard, 'showinguser' => $USER] 70 | ); 71 | $table = new student_badges('student_badges'); 72 | 73 | echo $OUTPUT->header(); 74 | 75 | if(!isset($intelliboard) || !$intelliboard->token) { 76 | echo $OUTPUT->render_from_template('local_intelliboard/access_alert', []); 77 | } else { 78 | echo $OUTPUT->render_from_template( 79 | 'local_intelliboard/student_badges', 80 | ['student_menu' => $renderer->render($studentmenurenderable)] 81 | ); 82 | echo $table->out(10, false); 83 | } 84 | 85 | $PAGE->requires->js_call_amd( 86 | 'local_intelliboard/intelliboard', 'circleProgress', [chart_options()->GradesXCalculationJSON] 87 | ); 88 | 89 | echo $OUTPUT->footer(); 90 | -------------------------------------------------------------------------------- /sqlreport.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2018 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../config.php'); 28 | require_once($CFG->libdir.'/adminlib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 30 | require_once($CFG->dirroot.'/local/intelliboard/output/forms/local_intelliboard_sqlreport.php'); 31 | 32 | require_login(); 33 | admin_externalpage_setup('intelliboardsql'); 34 | 35 | if (!is_siteadmin()) { 36 | throw new moodle_exception('invalidaccess', 'error'); 37 | } 38 | if (isset($CFG->intelliboardsql) and $CFG->intelliboardsql == false) { 39 | throw new moodle_exception('invalidaccess', 'error'); 40 | } 41 | 42 | $id = required_param('id', PARAM_INT); 43 | $delete = optional_param('delete', 0, PARAM_BOOL); 44 | $confirm = optional_param('confirm', 0, PARAM_BOOL); 45 | $returnurl = new moodle_url('/local/intelliboard/sqlreports.php'); 46 | 47 | if (!$data = $DB->get_record("local_intelliboard_reports", array('id'=>$id))) { 48 | throw new moodle_exception('invalidaccess', 'error'); 49 | } 50 | 51 | if ($delete and $data->id) { 52 | $PAGE->url->param('delete', 1); 53 | if ($confirm and confirm_sesskey()) { 54 | $intelliboard = intelliboard(['task'=>'delete', 'id'=>$data->appid], 'sql'); 55 | 56 | $DB->delete_records('local_intelliboard_reports', array('id'=>$data->id)); 57 | redirect($returnurl, get_string('remove_message', 'local_intelliboard')); 58 | } 59 | $strheading = get_string('delete'); 60 | $PAGE->navbar->add($strheading); 61 | echo $OUTPUT->header(); 62 | echo $OUTPUT->heading($strheading); 63 | $yesurl = new \moodle_url( 64 | '/local/intelliboard/sqlreport.php', 65 | array('id'=>$data->id, 'delete'=>1, 'confirm'=>1,'sesskey'=>sesskey()) 66 | ); 67 | $message = get_string('delete_message', 'local_intelliboard'); 68 | echo $OUTPUT->confirm($message, $yesurl, $returnurl); 69 | echo $OUTPUT->footer(); 70 | die; 71 | } 72 | 73 | $editform = new local_intelliboard_sqlreport_form(null, array('data'=>$data)); 74 | if ($editform->is_cancelled()) { 75 | redirect($returnurl); 76 | } else if ($sql = $editform->get_data()) { 77 | unset($sql->sqlcode); 78 | 79 | $DB->update_record('local_intelliboard_reports', $sql); 80 | $intelliboard = intelliboard(['task'=>'save', 'id'=>$data->appid, 'status'=>$sql->status], 'sql'); 81 | 82 | redirect($returnurl, get_string('success_message', 'local_intelliboard')); 83 | } 84 | 85 | $intelliboard = intelliboard(['task'=>'sqlreport']); 86 | 87 | echo $OUTPUT->header(); 88 | 89 | echo $editform->display(); 90 | 91 | echo $OUTPUT->footer(); 92 | -------------------------------------------------------------------------------- /classes/instructorlib.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | use local_intelliboard\repositories\user_settings; 27 | 28 | defined('MOODLE_INTERNAL') || die(); 29 | 30 | require_once("$CFG->libdir/externallib.php"); 31 | 32 | class local_intelliboard_instructorlib extends external_api { 33 | 34 | /** 35 | * Save instructor courses 36 | */ 37 | public static function save_instructor_courses_parameters() { 38 | return new external_function_parameters([ 39 | 'data' => new external_value(PARAM_RAW) 40 | ]); 41 | } 42 | 43 | public static function save_instructor_courses($data) { 44 | global $DB, $USER, $CFG; 45 | 46 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 47 | require_once($CFG->dirroot . '/local/intelliboard/instructor/lib.php'); 48 | 49 | $params = self::validate_parameters( 50 | self::save_instructor_courses_parameters(), ['data' => $data] 51 | ); 52 | 53 | self::validate_context(context_system::instance()); 54 | $availablecourses = intelliboard_instructor_getcourses('', true, '', false, false); 55 | $availablecourses = is_array($availablecourses) ? array_keys($availablecourses) : []; 56 | 57 | try { 58 | $transaction = $DB->start_delegated_transaction(); 59 | 60 | $DB->delete_records( 61 | 'local_intelliboard_assign', 62 | ['rel' => 'instructordashboard', 'type' => 'courses', 'userid' => $USER->id] 63 | ); 64 | 65 | $courses = json_decode($params['data'], true)['courses']; 66 | 67 | foreach ($courses as $course) { 68 | if(in_array($course, $availablecourses)) { 69 | $row = (object) [ 70 | 'rel' => 'instructordashboard', 71 | 'type' => 'courses', 72 | 'userid' => $USER->id, 73 | 'instance' => $course, 74 | 'timecreated' => time(), 75 | ]; 76 | 77 | $DB->insert_record('local_intelliboard_assign', $row); 78 | } 79 | } 80 | 81 | $transaction->allow_commit(); 82 | 83 | return ['status' => 200]; 84 | } catch(Exception $e) { 85 | $transaction->rollback($e); 86 | 87 | return ['status' => 500]; 88 | } 89 | } 90 | 91 | public static function save_instructor_courses_returns() { 92 | new external_single_structure([ 93 | 'status' => new external_value(PARAM_INT, 'Operation status'), 94 | ]); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /attendance/attendancelib.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | /** 27 | * Posts the launch petition HTML 28 | * 29 | * @param array $newparms Signed parameters 30 | * @param string $endpoint URL of the external tool 31 | * @param bool $debug Debug (true/false) 32 | * @return string 33 | * @throws coding_exception 34 | */ 35 | function lti_post_launch_html($newparms, $endpoint, $debug=false) { 36 | $r = "
\n"; 38 | 39 | // Contruct html for the launch parameters. 40 | foreach ($newparms as $key => $value) { 41 | $key = htmlspecialchars($key); 42 | $value = htmlspecialchars($value); 43 | if ( $key == "ext_submit" ) { 44 | $r .= "\n"; 51 | } 52 | 53 | if ( $debug ) { 54 | $r .= "\n"; 67 | $r .= ""; 68 | $r .= get_string("toggle_debug_data", "lti")."\n"; 69 | $r .= "
\n"; 70 | $r .= "".get_string("basiclti_endpoint", "lti")."
\n"; 71 | $r .= $endpoint . "
\n 
\n"; 72 | $r .= "".get_string("basiclti_parameters", "lti")."
\n"; 73 | foreach ($newparms as $key => $value) { 74 | $key = htmlspecialchars($key); 75 | $value = htmlspecialchars($value); 76 | $r .= "$key = $value
\n"; 77 | } 78 | $r .= " 
\n"; 79 | $r .= "
\n"; 80 | } 81 | $r .= "
\n"; 82 | 83 | if ( ! $debug ) { 84 | $r .= " \n"; 89 | } 90 | return $r; 91 | } 92 | -------------------------------------------------------------------------------- /reports.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../config.php'); 28 | require_once($CFG->libdir.'/adminlib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 30 | 31 | require_login(); 32 | require_capability('local/intelliboard:view', context_system::instance()); 33 | 34 | $report = optional_param('id', '', PARAM_RAW); 35 | $alias = optional_param('alias', '', PARAM_RAW); 36 | $intelliboard = intelliboard(['task'=>'reports']); 37 | 38 | if ($alias and !empty($intelliboard->reports)) { 39 | foreach($intelliboard->reports as $key=>$val) { 40 | if ($val->alias == $alias) { 41 | redirect(new moodle_url("/local/intelliboard/reports.php", array('id'=>$key))); 42 | break; 43 | } 44 | } 45 | } 46 | 47 | $report_type = isset($intelliboard->reports[$report]->type)?$intelliboard->reports[$report]->type:''; 48 | 49 | $PAGE->set_url(new moodle_url("/local/intelliboard/reports.php", array('id'=>$report))); 50 | $PAGE->set_pagelayout('report'); 51 | $PAGE->set_pagetype('reports'); 52 | $PAGE->set_context(context_system::instance()); 53 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 54 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 55 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 56 | echo $OUTPUT->header(); 57 | ?> 58 |
59 | 60 |
61 | alerts): ?> 62 | alerts as $text => $alert): ?> 63 | 64 | 65 | 66 | 67 |
68 | 69 | 70 |
71 | reports) and !empty($intelliboard->reports)): ?> 72 |
73 | reports as $key=>$val): ?> 74 | 75 | 76 |
77 | 78 | 79 | 80 |
81 | 82 |
83 | footer(); 85 | -------------------------------------------------------------------------------- /views/menu.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | ?> 27 | noalert) and $intelliboard->alert) ? $intelliboard->alert : ''; 33 | ?> 34 | 35 | debugging)): ?> 36 |
37 | 		
38 | 			debugging; ?>
39 | 		
40 | 	
41 | 42 | 43 | 44 | alerts): ?> 45 | alerts as $key => $value): ?> 46 |
47 | 48 | 49 | 50 | 51 | 80 | -------------------------------------------------------------------------------- /instructor/analytics.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | require('../../../config.php'); 28 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/instructor/lib.php'); 30 | require_once('../externallib.php'); 31 | 32 | 33 | $id = required_param('id', PARAM_INT); 34 | $page = optional_param('page', 0, PARAM_INT); 35 | $length = optional_param('length', 20, PARAM_INT); 36 | $action = optional_param('action', '', PARAM_RAW); 37 | $courseid = optional_param('courseid', 0, PARAM_INT); 38 | $cohortid = optional_param('cohortid', 0, PARAM_INT); 39 | $custom = optional_param('custom', 0, PARAM_INT); 40 | $custom2 = optional_param('custom2', 0, PARAM_INT); 41 | $daterange = clean_raw(optional_param('daterange', '', PARAM_RAW)); 42 | 43 | require_login(); 44 | intelliboard_instructor_access(); 45 | 46 | if ($action == 'export_pdf' || $action == 'export_excel' || $action == 'export_csv'){ 47 | include("analytic_templates/analytic_export_$id.php"); 48 | exit; 49 | } 50 | 51 | $params = array( 52 | 'do'=>'instructor', 53 | 'mode'=> 2 54 | ); 55 | $intelliboard = intelliboard($params); 56 | $factorInfo = chart_options(); 57 | 58 | $PAGE->set_url(new moodle_url("/local/intelliboard/instructor/analytics.php")); 59 | $PAGE->set_pagetype('analytics'); 60 | $PAGE->set_pagelayout('report'); 61 | $PAGE->set_context(context_system::instance()); 62 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 63 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 64 | $PAGE->requires->jquery(); 65 | $PAGE->requires->js('/local/intelliboard/assets/js/jquery.multiple.select.js'); 66 | $PAGE->requires->js('/local/intelliboard/assets/js/flatpickr.min.js'); 67 | if(file_exists('/local/intelliboard/assets/js/flatpickr_l10n/'.current_language().'.js')) { 68 | $PAGE->requires->js('/local/intelliboard/assets/js/flatpickr_l10n/'.current_language().'.js'); 69 | } 70 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 71 | $PAGE->requires->css('/local/intelliboard/assets/css/multiple-select.css'); 72 | $PAGE->requires->css('/local/intelliboard/assets/css/flatpickr.min.css'); 73 | 74 | echo $OUTPUT->header(); 75 | ?> 76 | token): ?> 77 | 78 | 79 | ';?> 80 |
81 | 82 | 83 | 84 |
85 | 86 | footer(); 87 | -------------------------------------------------------------------------------- /instructor/views/menu.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website https://intelliboard.net/ 25 | */ 26 | 27 | $id = optional_param('id', 0, PARAM_RAW); 28 | 29 | $intellicartenabled = false; 30 | if(get_config('local_intelliboard', 'intellicart') && file_exists($CFG->dirroot . '/local/intellicart/locallib.php')) { 31 | require_once($CFG->dirroot . '/local/intellicart/locallib.php'); 32 | $intellicartenabled = local_intellicart_enable('', true); 33 | } 34 | 35 | ?> 36 | 74 | -------------------------------------------------------------------------------- /student/reports.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * 21 | * @package local_intelliboard 22 | * @copyright 2017 IntelliBoard, Inc 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | * @website http://intelliboard.net/ 25 | */ 26 | 27 | require('../../../config.php'); 28 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 29 | require_once($CFG->dirroot .'/local/intelliboard/student/lib.php'); 30 | 31 | require_login(); 32 | require_capability('local/intelliboard:students', context_system::instance()); 33 | 34 | $report = optional_param('id', '', PARAM_RAW); 35 | $other_user = optional_param('user', 0, PARAM_INT); 36 | $showing_user = $USER; 37 | if(get_config('local_intelliboard', 't09')>0 && $other_user>0 && intelliboard_instructor_have_access($USER->id)){ 38 | $showing_user = core_user::get_user($other_user, '*', MUST_EXIST); 39 | } 40 | 41 | $report = optional_param('id', '', PARAM_RAW); 42 | $intelliboard = intelliboard(['task'=>'reports', 'mode' => 1]); 43 | $report_type = $intelliboard->reports[$report]->type; 44 | $params = http_build_query(['users'=>$showing_user->id ]); 45 | 46 | $totals = intelliboard_learner_totals($showing_user->id); 47 | 48 | 49 | $PAGE->set_url(new moodle_url("/local/intelliboard/student/reports.php")); 50 | $PAGE->set_pagetype('reports'); 51 | $PAGE->set_pagelayout('report'); 52 | $PAGE->set_context(context_system::instance()); 53 | $PAGE->set_title(get_string('intelliboardroot', 'local_intelliboard')); 54 | $PAGE->set_heading(get_string('intelliboardroot', 'local_intelliboard')); 55 | $PAGE->requires->jquery(); 56 | $PAGE->requires->js('/local/intelliboard/assets/js/flatpickr.min.js'); 57 | if(file_exists('/local/intelliboard/assets/js/flatpickr_l10n/'.current_language().'.js')) { 58 | $PAGE->requires->js('/local/intelliboard/assets/js/flatpickr_l10n/'.current_language().'.js'); 59 | } 60 | $PAGE->requires->js('/local/intelliboard/assets/js/jquery.circlechart.js'); 61 | $PAGE->requires->css('/local/intelliboard/assets/css/flatpickr.min.css'); 62 | $PAGE->requires->css('/local/intelliboard/assets/css/style.css'); 63 | echo $OUTPUT->header(); 64 | ?> 65 |
66 | 67 |
68 | alerts): ?> 69 | alerts as $text => $alert): ?> 70 | 71 | 72 | 73 | 74 |
75 | 76 | 77 |
78 |
79 | 80 |
81 | footer(); 83 | -------------------------------------------------------------------------------- /attendance/index.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | require_once('../../../config.php'); 27 | require_once($CFG->dirroot .'/local/intelliboard/locallib.php'); 28 | 29 | $courseid = optional_param('course_id', 0, PARAM_INT); 30 | 31 | require_login(); 32 | 33 | if(!get_config('local_intelliboard', 'enableattendance')){ 34 | throw new moodle_exception('invalidaccess', 'error'); 35 | } 36 | 37 | if($courseid) { 38 | $course =$DB->get_record('course', ['id' => $courseid], '*', MUST_EXIST); 39 | $PAGE->set_course($course); 40 | $PAGE->set_context(context_course::instance($courseid)); 41 | $PAGE->navigation->find( 42 | 'intelliboard_attendance', navigation_node::TYPE_CUSTOM 43 | )->make_active(); 44 | } else { 45 | $PAGE->set_context(context_system::instance()); 46 | } 47 | 48 | $PAGE->set_url(new moodle_url("/local/intelliboard/attendance/index.php")); 49 | $PAGE->set_title(get_string('attendance', 'local_intelliboard')); 50 | $PAGE->set_heading(get_string('attendance', 'local_intelliboard')); 51 | $PAGE->navbar->add(get_string('attendance', 'local_intelliboard')); 52 | 53 | $params = array( 54 | 'mode'=> 1 55 | ); 56 | $intelliboard = intelliboard($params); 57 | 58 | echo $OUTPUT->header(); 59 | 60 | if(!isset($intelliboard) || !$intelliboard->token) { 61 | echo ''; 62 | echo $OUTPUT->footer(); 63 | exit; 64 | } 65 | $contenturl = sprintf('launch.php?sesskey=%s&course_id=%s', sesskey(), $courseid); 66 | 67 | // Request the launch content with an iframe tag. 68 | echo ""; 70 | 71 | // Output script to make the iframe tag be as large as possible. 72 | $resize = ' 73 | 94 | '; 95 | 96 | echo $resize; 97 | 98 | echo $OUTPUT->footer(); -------------------------------------------------------------------------------- /classes/bb_collaborate/bb_collaborate_repository.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This plugin provides access to Moodle data in form of analytics and reports in real time. 19 | * 20 | * @package local_intelliboard 21 | * @copyright 2019 IntelliBoard, Inc 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | * @website http://intelliboard.net/ 24 | */ 25 | 26 | namespace local_intelliboard\bb_collaborate; 27 | 28 | use cache; 29 | 30 | class bb_collaborate_repository { 31 | /** 32 | * Key of cached access token 33 | */ 34 | const ACCESS_TOKEN_CACHE_KEY = 'bb_col_access_token'; 35 | 36 | /** @var string Type key in table {local_intelliboard_att_sync} */ 37 | const ATT_SYNC_TYPE = 'bb_collaborate'; 38 | 39 | /** 40 | * Get finished non-tracked sessions 41 | * 42 | * @return array 43 | * @throws \dml_exception 44 | */ 45 | public function getNonTrackedSessions() { 46 | global $DB; 47 | 48 | $sessions = $DB->get_records_sql( 49 | "SELECT c.*, iat.data as sync_data 50 | FROM {collaborate} c 51 | LEFT JOIN {local_intelliboard_att_sync} iat ON iat.instance = c.id AND 52 | iat.type = :type 53 | LEFT JOIN {local_intelliboard_bb_trck_m} libtm ON libtm.sessionuid = c.sessionuid 54 | WHERE c.timeend <= :currentutc AND 55 | libtm.id IS NULL", 56 | [ 57 | 'currentutc' => ( 58 | new \DateTime("now", new \DateTimeZone("UTC")) 59 | )->getTimestamp(), 60 | 'type' => self::ATT_SYNC_TYPE 61 | ] 62 | ); 63 | 64 | return $sessions; 65 | } 66 | 67 | /** 68 | * Get cached access token of bb collaborate 69 | * 70 | * @return false|mixed 71 | * @throws \coding_exception 72 | */ 73 | public function cached_access_token() { 74 | $cache = cache::make( 75 | 'local_intelliboard', 'bb_collaborate_access_token' 76 | ); 77 | 78 | return $cache->get(self::ACCESS_TOKEN_CACHE_KEY); 79 | } 80 | 81 | /** 82 | * List of BB collabroate sessions, which not synchronized with InAttendance 83 | * 84 | * @return array 85 | * @throws \dml_exception 86 | */ 87 | public function not_synchronized_sessions() { 88 | global $DB; 89 | 90 | return $DB->get_records_sql( 91 | "SELECT cb.id, cb.course, cm.id as activity, 92 | cb.name as session_name, cb.timestart, cb.timeend, 93 | cb.intro as description 94 | FROM {collaborate} cb 95 | LEFT JOIN {local_intelliboard_att_sync} lt ON lt.type = :type AND 96 | lt.instance = cb.id 97 | LEFT JOIN {modules} m ON m.name = 'collaborate' 98 | LEFT JOIN {course_modules} cm ON cm.course = cb.course AND 99 | cm.module = m.id AND 100 | cm.instance = cb.id 101 | WHERE lt.id IS NULL", 102 | ['type' => self::ATT_SYNC_TYPE] 103 | ); 104 | } 105 | } --------------------------------------------------------------------------------