├── js ├── codemirror │ ├── .travis.yml │ ├── .gitignore │ ├── .gitattributes │ ├── addon │ │ ├── display │ │ │ ├── fullscreen.css │ │ │ ├── fullscreen.js │ │ │ └── placeholder.js │ │ ├── edit │ │ │ ├── trailingspace.js │ │ │ ├── continuelist.js │ │ │ └── matchtags.js │ │ ├── lint │ │ │ ├── json-lint.js │ │ │ ├── css-lint.js │ │ │ └── coffeescript-lint.js │ │ ├── dialog │ │ │ └── dialog.css │ │ ├── fold │ │ │ ├── indent-fold.js │ │ │ └── comment-fold.js │ │ ├── mode │ │ │ ├── multiplex_test.js │ │ │ └── loadmode.js │ │ ├── hint │ │ │ ├── show-hint.css │ │ │ ├── anyword-hint.js │ │ │ └── css-hint.js │ │ ├── runmode │ │ │ ├── colorize.js │ │ │ └── runmode.js │ │ ├── scroll │ │ │ └── scrollpastend.js │ │ ├── tern │ │ │ ├── worker.js │ │ │ └── tern.css │ │ ├── selection │ │ │ └── active-line.js │ │ └── comment │ │ │ └── continuecomment.js │ ├── bower.json │ ├── README.md │ ├── package.json │ ├── LICENSE │ └── keymap │ │ └── extra.js └── datatables │ ├── media │ └── images │ │ ├── favicon.ico │ │ ├── sort_asc.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ ├── Sorting icons.psd │ │ ├── back_disabled.png │ │ ├── back_enabled.png │ │ ├── forward_disabled.png │ │ ├── forward_enabled.png │ │ ├── back_enabled_hover.png │ │ ├── sort_asc_disabled.png │ │ ├── sort_desc_disabled.png │ │ └── forward_enabled_hover.png │ ├── extras │ ├── ColVis │ │ └── media │ │ │ ├── images │ │ │ └── button.png │ │ │ ├── js │ │ │ └── ColVis.min.js.gz │ │ │ ├── docs │ │ │ ├── media │ │ │ │ ├── images │ │ │ │ │ ├── arrow.jpg │ │ │ │ │ ├── arrow.png │ │ │ │ │ └── extended.png │ │ │ │ ├── license │ │ │ │ │ └── Syntax Highlighter │ │ │ │ └── js │ │ │ │ │ └── shBrushJScript.js │ │ │ └── index.html │ │ │ └── css │ │ │ ├── ColVis.css │ │ │ └── ColVisAlt.css │ ├── KeyTable │ │ └── js │ │ │ └── KeyTable.min.js.gz │ ├── TableTools │ │ └── media │ │ │ ├── images │ │ │ ├── csv.png │ │ │ ├── pdf.png │ │ │ ├── xls.png │ │ │ ├── copy.png │ │ │ ├── print.png │ │ │ ├── background.png │ │ │ ├── collection.png │ │ │ ├── copy_hover.png │ │ │ ├── csv_hover.png │ │ │ ├── pdf_hover.png │ │ │ ├── xls_hover.png │ │ │ ├── print_hover.png │ │ │ ├── psd │ │ │ │ ├── printer.psd │ │ │ │ ├── collection.psd │ │ │ │ ├── file_types.psd │ │ │ │ └── copy document.psd │ │ │ └── collection_hover.png │ │ │ ├── as3 │ │ │ └── lib │ │ │ │ └── AlivePDF.swc │ │ │ ├── swf │ │ │ ├── copy_csv_xls.swf │ │ │ └── copy_csv_xls_pdf.swf │ │ │ └── js │ │ │ └── TableTools.min.js.gz │ ├── AutoFill │ │ └── media │ │ │ ├── images │ │ │ └── filler.png │ │ │ ├── js │ │ │ └── AutoFill.min.js.gz │ │ │ ├── docs │ │ │ ├── media │ │ │ │ ├── images │ │ │ │ │ ├── arrow.jpg │ │ │ │ │ ├── arrow.png │ │ │ │ │ └── extended.png │ │ │ │ ├── license │ │ │ │ │ └── Syntax Highlighter │ │ │ │ └── js │ │ │ │ │ └── shBrushJScript.js │ │ │ └── index.html │ │ │ └── css │ │ │ └── AutoFill.css │ ├── ColReorder │ │ └── media │ │ │ ├── images │ │ │ └── insert.png │ │ │ ├── js │ │ │ └── ColReorder.min.js.gz │ │ │ ├── docs │ │ │ ├── media │ │ │ │ ├── images │ │ │ │ │ ├── arrow.jpg │ │ │ │ │ ├── arrow.png │ │ │ │ │ └── extended.png │ │ │ │ ├── license │ │ │ │ │ └── Syntax Highlighter │ │ │ │ └── js │ │ │ │ │ └── shBrushJScript.js │ │ │ └── index.html │ │ │ └── css │ │ │ └── ColReorder.css │ ├── FixedHeader │ │ └── js │ │ │ └── FixedHeader.min.js.gz │ ├── FixedColumns │ │ ├── docs │ │ │ ├── media │ │ │ │ ├── images │ │ │ │ │ ├── arrow.jpg │ │ │ │ │ ├── arrow.png │ │ │ │ │ └── extended.png │ │ │ │ ├── license │ │ │ │ │ └── Syntax Highlighter │ │ │ │ └── js │ │ │ │ │ └── shBrushJScript.js │ │ │ └── index.html │ │ └── media │ │ │ └── js │ │ │ └── FixedColumns.min.js.gz │ └── Scroller │ │ └── media │ │ ├── docs │ │ └── media │ │ │ ├── images │ │ │ ├── arrow.jpg │ │ │ ├── arrow.png │ │ │ └── extended.png │ │ │ ├── license │ │ │ └── Syntax Highlighter │ │ │ └── js │ │ │ └── shBrushJScript.js │ │ ├── images │ │ └── loading-background.png │ │ ├── js │ │ └── dataTables.scroller.min.js.gz │ │ └── css │ │ └── dataTables.scroller.css │ ├── component.json │ ├── package.json │ ├── Readme.txt │ └── license-bsd.txt ├── pix ├── asc.gif ├── desc.gif ├── normal.gif └── print.png ├── export ├── csv │ ├── pix.gif │ └── export.php ├── ods │ ├── pix.gif │ └── export.php └── xls │ ├── pix.gif │ └── export.php ├── lib ├── Fonts │ ├── MankSans.ttf │ ├── tahoma.ttf │ └── GeosansLight.ttf └── pChart2 │ ├── change.log │ ├── readme.txt │ ├── palettes │ ├── blind.color │ ├── evening.color │ ├── navy.color │ ├── kitchen.color │ ├── shade.color │ ├── spring.color │ ├── autumn.color │ ├── light.color │ └── summer.color │ ├── Fonts │ ├── Bedizen.ttf │ ├── calibri.ttf │ ├── tahoma.ttf │ ├── verdana.ttf │ ├── Forgotte.ttf │ ├── MankSans.ttf │ ├── Silkscreen.ttf │ ├── GeosansLight.ttf │ ├── advent_light.ttf │ └── pf_arma_five.ttf │ ├── class │ └── pRadar.class.php │ └── data │ └── 39.db ├── composer.json ├── filter_form.php ├── components ├── plot │ └── component.class.php ├── ordering │ ├── component.class.php │ ├── userfieldorder │ │ ├── form.php │ │ └── plugin.class.php │ ├── coursefieldorder │ │ ├── form.php │ │ └── plugin.class.php │ └── categoryfieldorder │ │ ├── form.php │ │ └── plugin.class.php ├── filters │ ├── component.class.php │ ├── fcoursefield │ │ └── form.php │ ├── fsearchuserfield │ │ └── form.php │ └── fuserfield │ │ └── form.php ├── calcs │ ├── max │ │ └── form.php │ ├── min │ │ └── form.php │ ├── sum │ │ └── form.php │ └── average │ │ └── form.php ├── conditions │ ├── currentuser │ │ └── plugin.class.php │ ├── currentreportcourse │ │ └── plugin.class.php │ ├── usersincurrentcourse │ │ ├── plugin.class.php │ │ └── form.php │ ├── currentusercourses │ │ └── plugin.class.php │ ├── coursecategory │ │ ├── form.php │ │ └── plugin.class.php │ ├── usersincohorts │ │ ├── form.php │ │ └── plugin.class.php │ ├── coursechild │ │ ├── plugin.class.php │ │ └── form.php │ ├── courseparent │ │ ├── plugin.class.php │ │ └── form.php │ ├── parentcategory │ │ └── form.php │ └── ccoursefield │ │ └── plugin.class.php ├── permissions │ ├── anyone │ │ └── plugin.class.php │ ├── reportscapabilities │ │ └── plugin.class.php │ ├── usersincoursereport │ │ └── plugin.class.php │ └── roleincourse │ │ ├── form.php │ │ └── plugin.class.php ├── columns │ ├── currentuserfinalgrade │ │ ├── form.php │ │ └── plugin.class.php │ ├── finalgradeincurrentcourse │ │ ├── form.php │ │ └── plugin.class.php │ ├── roleusersn │ │ ├── plugin.class.php │ │ └── form.php │ ├── coursefield │ │ └── form.php │ ├── categoryfield │ │ └── form.php │ └── date │ │ └── plugin.class.php ├── timeline │ └── component.class.php └── template │ └── component.class.php ├── component.class.php ├── get_remote_report.php ├── version.php ├── plugin.class.php ├── reports ├── users │ └── report.class.php ├── courses │ └── report.class.php └── categories │ └── report.class.php ├── list_reports_in_category.php ├── edit_form.php ├── import_form.php ├── repository.php └── tabs.php /js/codemirror/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /js/codemirror/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log 3 | test.html 4 | .tern-* 5 | *~ 6 | *.swp 7 | -------------------------------------------------------------------------------- /pix/asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/pix/asc.gif -------------------------------------------------------------------------------- /pix/desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/pix/desc.gif -------------------------------------------------------------------------------- /pix/normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/pix/normal.gif -------------------------------------------------------------------------------- /pix/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/pix/print.png -------------------------------------------------------------------------------- /export/csv/pix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/export/csv/pix.gif -------------------------------------------------------------------------------- /export/ods/pix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/export/ods/pix.gif -------------------------------------------------------------------------------- /export/xls/pix.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/export/xls/pix.gif -------------------------------------------------------------------------------- /lib/Fonts/MankSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/Fonts/MankSans.ttf -------------------------------------------------------------------------------- /lib/Fonts/tahoma.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/Fonts/tahoma.ttf -------------------------------------------------------------------------------- /lib/pChart2/change.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/change.log -------------------------------------------------------------------------------- /lib/pChart2/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/readme.txt -------------------------------------------------------------------------------- /lib/Fonts/GeosansLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/Fonts/GeosansLight.ttf -------------------------------------------------------------------------------- /lib/pChart2/palettes/blind.color: -------------------------------------------------------------------------------- 1 | 109,152,171,100 2 | 0,39,94,100 3 | 254,183,41,100 4 | 168,177,184,100 5 | 255,255,255,100 6 | 0,0,0,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/evening.color: -------------------------------------------------------------------------------- 1 | 242,245,237,100 2 | 255,194,0,100 3 | 255,91,0,100 4 | 184,0,40,100 5 | 132,0,46,100 6 | 74,192,242,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/navy.color: -------------------------------------------------------------------------------- 1 | 25,78,132,100 2 | 59,107,156,100 3 | 31,36,42,100 4 | 55,65,74,100 5 | 96,187,34,100 6 | 242,186,187,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/Fonts/Bedizen.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/Bedizen.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/calibri.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/calibri.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/tahoma.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/tahoma.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/verdana.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/verdana.ttf -------------------------------------------------------------------------------- /lib/pChart2/palettes/kitchen.color: -------------------------------------------------------------------------------- 1 | 155,225,251,100 2 | 197,239,253,100 3 | 189,32,49,100 4 | 35,31,32,100 5 | 255,255,255,100 6 | 0,98,149,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/shade.color: -------------------------------------------------------------------------------- 1 | 117,113,22,100 2 | 174,188,33,100 3 | 217,219,86,100 4 | 0,71,127,100 5 | 76,136,190,100 6 | 141,195,233,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/spring.color: -------------------------------------------------------------------------------- 1 | 146,123,81,100 2 | 168,145,102,100 3 | 128,195,28,100 4 | 188,221,90,100 5 | 255,121,0,100 6 | 251,179,107,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/Fonts/Forgotte.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/Forgotte.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/MankSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/MankSans.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/Silkscreen.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/Silkscreen.ttf -------------------------------------------------------------------------------- /lib/pChart2/palettes/autumn.color: -------------------------------------------------------------------------------- 1 | 185,106,154,100 2 | 216,137,184,100 3 | 156,192,137,100 4 | 216,243,201,100 5 | 253,232,215,100 6 | 255,255,255,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/light.color: -------------------------------------------------------------------------------- 1 | 239,210,121,100 2 | 149,203,233,100 3 | 2,71,105,100 4 | 175,215,117,100 5 | 44,87,0,100 6 | 222,157,127,100 7 | 8 | -------------------------------------------------------------------------------- /lib/pChart2/palettes/summer.color: -------------------------------------------------------------------------------- 1 | 253,184,19,100 2 | 246,139,31,100 3 | 241,112,34,100 4 | 98,194,204,100 5 | 228,246,248,100 6 | 238,246,108,100 7 | -------------------------------------------------------------------------------- /lib/pChart2/Fonts/GeosansLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/GeosansLight.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/advent_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/advent_light.ttf -------------------------------------------------------------------------------- /lib/pChart2/Fonts/pf_arma_five.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/Fonts/pf_arma_five.ttf -------------------------------------------------------------------------------- /lib/pChart2/class/pRadar.class.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/lib/pChart2/class/pRadar.class.php -------------------------------------------------------------------------------- /js/codemirror/.gitattributes: -------------------------------------------------------------------------------- 1 | *.txt text 2 | *.js text 3 | *.html text 4 | *.md text 5 | *.json text 6 | *.yml text 7 | *.css text 8 | *.svg text 9 | -------------------------------------------------------------------------------- /js/datatables/media/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/favicon.ico -------------------------------------------------------------------------------- /js/datatables/media/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/sort_asc.png -------------------------------------------------------------------------------- /js/datatables/media/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/sort_both.png -------------------------------------------------------------------------------- /js/datatables/media/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/sort_desc.png -------------------------------------------------------------------------------- /js/datatables/media/images/Sorting icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/Sorting icons.psd -------------------------------------------------------------------------------- /js/datatables/media/images/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/back_disabled.png -------------------------------------------------------------------------------- /js/datatables/media/images/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/back_enabled.png -------------------------------------------------------------------------------- /js/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /js/datatables/media/images/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/forward_disabled.png -------------------------------------------------------------------------------- /js/datatables/media/images/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/forward_enabled.png -------------------------------------------------------------------------------- /js/datatables/media/images/back_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/back_enabled_hover.png -------------------------------------------------------------------------------- /js/datatables/media/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /js/datatables/media/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColVis/media/images/button.png -------------------------------------------------------------------------------- /js/datatables/extras/KeyTable/js/KeyTable.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/KeyTable/js/KeyTable.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/csv.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/pdf.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/xls.png -------------------------------------------------------------------------------- /js/datatables/media/images/forward_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/media/images/forward_enabled_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/images/filler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/AutoFill/media/images/filler.png -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/js/ColVis.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColVis/media/js/ColVis.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/copy.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/print.png -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/js/AutoFill.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/AutoFill/media/js/AutoFill.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/images/insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColReorder/media/images/insert.png -------------------------------------------------------------------------------- /js/datatables/extras/FixedHeader/js/FixedHeader.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/FixedHeader/js/FixedHeader.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/as3/lib/AlivePDF.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/as3/lib/AlivePDF.swc -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/background.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/collection.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/copy_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/copy_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/csv_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/csv_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/pdf_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/pdf_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/xls_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/xls_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/swf/copy_csv_xls.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/swf/copy_csv_xls.swf -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/js/ColReorder.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColReorder/media/js/ColReorder.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/media/images/arrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColVis/media/docs/media/images/arrow.jpg -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/media/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColVis/media/docs/media/images/arrow.png -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/media/images/arrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/FixedColumns/docs/media/images/arrow.jpg -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/media/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/FixedColumns/docs/media/images/arrow.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/print_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/print_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/psd/printer.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/psd/printer.psd -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/js/TableTools.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/js/TableTools.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/media/images/arrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/AutoFill/media/docs/media/images/arrow.jpg -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/media/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/AutoFill/media/docs/media/images/arrow.png -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/media/images/extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColVis/media/docs/media/images/extended.png -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/media/images/extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/FixedColumns/docs/media/images/extended.png -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/docs/media/images/arrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/Scroller/media/docs/media/images/arrow.jpg -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/docs/media/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/Scroller/media/docs/media/images/arrow.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/psd/collection.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/psd/collection.psd -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/psd/file_types.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/psd/file_types.psd -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/media/images/extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/AutoFill/media/docs/media/images/extended.png -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/media/images/arrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColReorder/media/docs/media/images/arrow.jpg -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/media/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColReorder/media/docs/media/images/arrow.png -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/media/js/FixedColumns.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/FixedColumns/media/js/FixedColumns.min.js.gz -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/docs/media/images/extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/Scroller/media/docs/media/images/extended.png -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/images/loading-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/Scroller/media/images/loading-background.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/collection_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/collection_hover.png -------------------------------------------------------------------------------- /js/datatables/extras/TableTools/media/images/psd/copy document.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/TableTools/media/images/psd/copy document.psd -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/media/images/extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/ColReorder/media/docs/media/images/extended.png -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/js/dataTables.scroller.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-block_configurablereports/CR_23_STABLE/js/datatables/extras/Scroller/media/js/dataTables.scroller.min.js.gz -------------------------------------------------------------------------------- /js/datatables/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataTables", 3 | "version": "1.9.4", 4 | "main": [ 5 | "./media/js/jquery.dataTables.js", 6 | "./media/css/jquery.dataTables.css" 7 | ], 8 | "dependencies": { 9 | "jquery": "~1.8.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /js/codemirror/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodeMirror", 3 | "version": "3.18.0", 4 | "main": ["lib/codemirror.js", "lib/codemirror.css"], 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "components", 9 | "bin", 10 | "demo", 11 | "doc", 12 | "test", 13 | "index.html", 14 | "package.json" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/css/ColReorder.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Namespace DTCR - "DataTables ColReorder" plug-in 3 | */ 4 | 5 | table.DTCR_clonedTable { 6 | background-color: white; 7 | z-index: 202; 8 | } 9 | 10 | div.DTCR_pointer { 11 | width: 1px; 12 | background-color: #0259C4; 13 | z-index: 201; 14 | } 15 | 16 | body.alt div.DTCR_pointer { 17 | margin-top: -15px; 18 | margin-left: -9px; 19 | width: 18px; 20 | background: url('../images/insert.png') no-repeat top left; 21 | } -------------------------------------------------------------------------------- /js/codemirror/addon/edit/trailingspace.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) { 2 | if (prev == CodeMirror.Init) prev = false; 3 | if (prev && !val) 4 | cm.removeOverlay("trailingspace"); 5 | else if (!prev && val) 6 | cm.addOverlay({ 7 | token: function(stream) { 8 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {} 9 | if (i > stream.pos) { stream.pos = i; return null; } 10 | stream.pos = l; 11 | return "trailingspace"; 12 | }, 13 | name: "trailingspace" 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/css/AutoFill.css: -------------------------------------------------------------------------------- 1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 | * AutoFill styles 3 | */ 4 | 5 | div.AutoFill_filler { 6 | display: none; 7 | position: absolute; 8 | height: 14px; 9 | width: 14px; 10 | background: url(../images/filler.png) no-repeat center center; 11 | z-index: 1002; 12 | } 13 | 14 | div.AutoFill_border { 15 | display: none; 16 | position: absolute; 17 | background-color: #0063dc; 18 | z-index: 1001; 19 | 20 | box-shadow: 0px 0px 5px #76b4ff; 21 | -moz-box-shadow: 0px 0px 5px #76b4ff; 22 | -webkit-box-shadow: 0px 0px 5px #76b4ff; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /js/codemirror/addon/lint/json-lint.js: -------------------------------------------------------------------------------- 1 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint 2 | 3 | // declare global: jsonlint 4 | 5 | CodeMirror.registerHelper("lint", "json", function(text) { 6 | var found = []; 7 | jsonlint.parseError = function(str, hash) { 8 | var loc = hash.loc; 9 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 10 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 11 | message: str}); 12 | }; 13 | try { jsonlint.parse(text); } 14 | catch(e) {} 15 | return found; 16 | }); 17 | CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated 18 | -------------------------------------------------------------------------------- /js/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: white; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: #333; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /js/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | [![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror) 3 | [![NPM version](https://badge.fury.io/js/codemirror.png)](http://badge.fury.io/js/codemirror) 4 | 5 | CodeMirror is a JavaScript component that provides a code editor in 6 | the browser. When a mode is available for the language you are coding 7 | in, it will color your code, and optionally help with indentation. 8 | 9 | The project page is http://codemirror.net 10 | The manual is at http://codemirror.net/doc/manual.html 11 | The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md) 12 | -------------------------------------------------------------------------------- /js/codemirror/addon/fold/indent-fold.js: -------------------------------------------------------------------------------- 1 | CodeMirror.registerHelper("fold", "indent", function(cm, start) { 2 | var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); 3 | var myIndent = CodeMirror.countColumn(firstLine, null, tabSize); 4 | for (var i = start.line + 1, end = cm.lineCount(); i < end; ++i) { 5 | var curLine = cm.getLine(i); 6 | if (CodeMirror.countColumn(curLine, null, tabSize) < myIndent && 7 | CodeMirror.countColumn(cm.getLine(i-1), null, tabSize) > myIndent) 8 | return {from: CodeMirror.Pos(start.line, firstLine.length), 9 | to: CodeMirror.Pos(i, curLine.length)}; 10 | } 11 | }); 12 | CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated 13 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jleyva/moodle-block_configurablereports", 3 | "type": "moodle-block", 4 | "description": "This block is a Moodle custom reports builder. You can create custom reports without SQL knowledge. It's a tool suitable for admins or teachers.", 5 | "homepage": "https://moodle.org/plugins/view.php?plugin=block_configurable_reports", 6 | "license": "GPL-3.0+", 7 | "require": { 8 | "composer/installers": "*" 9 | }, 10 | "extra": { 11 | "installer-name": "configurable_reports" 12 | }, 13 | "support": { 14 | "issues": "http://tracker.moodle.org/browse/CONTRIB/component/10753", 15 | "source": "https://github.com/jleyva/moodle-block_configurablereports/" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /js/codemirror/addon/lint/css-lint.js: -------------------------------------------------------------------------------- 1 | // Depends on csslint.js from https://github.com/stubbornella/csslint 2 | 3 | // declare global: CSSLint 4 | 5 | CodeMirror.registerHelper("lint", "css", function(text) { 6 | var found = []; 7 | var results = CSSLint.verify(text), messages = results.messages, message = null; 8 | for ( var i = 0; i < messages.length; i++) { 9 | message = messages[i]; 10 | var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col; 11 | found.push({ 12 | from: CodeMirror.Pos(startLine, startCol), 13 | to: CodeMirror.Pos(endLine, endCol), 14 | message: message.message, 15 | severity : message.type 16 | }); 17 | } 18 | return found; 19 | }); 20 | -------------------------------------------------------------------------------- /js/codemirror/addon/edit/continuelist.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/, 5 | unorderedBullets = '*+-'; 6 | 7 | CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { 8 | var pos = cm.getCursor(), 9 | inList = cm.getStateAfter(pos.line).list, 10 | match; 11 | 12 | if (!inList || !(match = cm.getLine(pos.line).match(listRE))) { 13 | cm.execCommand('newlineAndIndent'); 14 | return; 15 | } 16 | 17 | var indent = match[1], after = match[4]; 18 | var bullet = unorderedBullets.indexOf(match[2]) >= 0 19 | ? match[2] 20 | : (parseInt(match[3], 10) + 1) + '.'; 21 | 22 | cm.replaceSelection('\n' + indent + bullet + after, 'end'); 23 | }; 24 | 25 | }()); 26 | -------------------------------------------------------------------------------- /js/codemirror/addon/mode/multiplex_test.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | CodeMirror.defineMode("markdown_with_stex", function(){ 3 | var inner = CodeMirror.getMode({}, "stex"); 4 | var outer = CodeMirror.getMode({}, "markdown"); 5 | 6 | var innerOptions = { 7 | open: '$', 8 | close: '$', 9 | mode: inner, 10 | delimStyle: 'delim', 11 | innerStyle: 'inner' 12 | }; 13 | 14 | return CodeMirror.multiplexingMode(outer, innerOptions); 15 | }); 16 | 17 | var mode = CodeMirror.getMode({}, "markdown_with_stex"); 18 | 19 | function MT(name) { 20 | test.mode( 21 | name, 22 | mode, 23 | Array.prototype.slice.call(arguments, 1), 24 | 'multiplexing'); 25 | } 26 | 27 | MT( 28 | "stexInsideMarkdown", 29 | "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]"); 30 | })(); 31 | -------------------------------------------------------------------------------- /js/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | .CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /lib/pChart2/data/39.db: -------------------------------------------------------------------------------- 1 | 0;101001101101 2 | 1;110100101011 3 | 2;101100101011 4 | 3;110110010101 5 | 4;101001101011 6 | 5;110100110101 7 | 6;101100110101 8 | 7;101001011011 9 | 8;110100101101 10 | 9;101100101101 11 | A;110101001011 12 | B;101101001011 13 | C;110110100101 14 | D;101011001011 15 | E;110101100101 16 | F;101101100101 17 | G;101010011011 18 | H;110101001101 19 | I;101101001101 20 | J;101011001101 21 | K;110101010011 22 | L;101101010011 23 | M;110110101001 24 | N;101011010011 25 | O;110101101001 26 | P;101101101001 27 | Q;101010110011 28 | R;110101011001 29 | S;101101011001 30 | T;101011011001 31 | U;110010101011 32 | V;100110101011 33 | W;110011010101 34 | X;100101101011 35 | Y;110010110101 36 | Z;100110110101 37 | -;100101011011 38 | .;110010101101 39 | ;100110101101 40 | $;100100100101 41 | /;100100101001 42 | +;100101001001 43 | %;101001001001 44 | *;100101101101 -------------------------------------------------------------------------------- /js/codemirror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"3.18.0", 4 | "main": "lib/codemirror.js", 5 | "description": "In-browser code editing made bearable", 6 | "licenses": [{"type": "MIT", 7 | "url": "http://codemirror.net/LICENSE"}], 8 | "directories": {"lib": "./lib"}, 9 | "scripts": {"test": "node ./test/run.js"}, 10 | "devDependencies": {"node-static": "0.6.0"}, 11 | "bugs": "http://github.com/marijnh/CodeMirror/issues", 12 | "keywords": ["JavaScript", "CodeMirror", "Editor"], 13 | "homepage": "http://codemirror.net", 14 | "maintainers":[{"name": "Marijn Haverbeke", 15 | "email": "marijnh@gmail.com", 16 | "web": "http://marijnhaverbeke.nl"}], 17 | "repository": {"type": "git", 18 | "url": "http://marijnhaverbeke.nl/git/codemirror"} 19 | } 20 | -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/css/dataTables.scroller.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Namespace: DTS (DataTables Scroller) 4 | */ 5 | 6 | div.DTS tbody th, 7 | div.DTS tbody td { 8 | white-space: nowrap; 9 | } 10 | 11 | div.DTS tbody tr.even { 12 | background-color: white; 13 | } 14 | 15 | div.DTS div.DTS_Loading { 16 | position: absolute; 17 | top: 50%; 18 | left: 50%; 19 | width: 200px; 20 | height: 20px; 21 | margin-top: -20px; 22 | margin-left: -100px; 23 | z-index: 1; 24 | 25 | border: 1px solid #999; 26 | padding: 20px 0; 27 | text-align: center; 28 | background-color: white; 29 | background-color: rgba(255, 255, 255, 0.5); 30 | } 31 | 32 | div.DTS div.dataTables_scrollHead { 33 | background-color: white; 34 | } 35 | 36 | div.DTS div.dataTables_scrollBody { 37 | z-index: 2; 38 | } 39 | 40 | div.DTS div.dataTables_scroll { 41 | background: url('../images/loading-background.png') repeat 0 0; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /js/datatables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataTables", 3 | "version": "1.9.4", 4 | "title": "DataTables", 5 | "author": { 6 | "name": "Allan Jardine", 7 | "url": "http://sprymedia.co.uk" 8 | }, 9 | "licenses": [ 10 | { 11 | "type": "BSD", 12 | "url": "http://datatables.net/license_bsd" 13 | }, 14 | { 15 | "type": "GPLv2", 16 | "url": "http://datatables.net/license_gpl2" 17 | } 18 | ], 19 | "dependencies": { 20 | "jquery": "1.4 - 1.8" 21 | }, 22 | "description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.", 23 | "keywords": [ 24 | "DataTables", 25 | "DataTable", 26 | "table", 27 | "grid", 28 | "filter", 29 | "sort", 30 | "page", 31 | "internationalisable" 32 | ], 33 | "homepage": "http://datatables.net" 34 | } 35 | -------------------------------------------------------------------------------- /filter_form.php: -------------------------------------------------------------------------------- 1 | libdir.'/formslib.php'); 8 | 9 | class report_edit_form extends moodleform { 10 | function definition() { 11 | global $DB, $USER, $CFG, $COURSE; 12 | 13 | $mform =& $this->_form; 14 | 15 | $mform->addElement('header', 'general', get_string('filter', 'block_configurable_reports')); 16 | 17 | $this->_customdata->add_filter_elements($mform); 18 | 19 | 20 | $mform->addElement('hidden', 'id', $this->_customdata->config->id); 21 | $mform->addElement('hidden', 'courseid', $COURSE->id); 22 | $mform->setType('id', PARAM_INT); 23 | $mform->setType('courseid', PARAM_INT); 24 | 25 | // buttons 26 | $this->add_action_buttons(true, get_string('filter_apply', 'block_configurable_reports')); 27 | 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /js/codemirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | CodeMirror.colorize = (function() { 2 | 3 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 4 | 5 | function textContent(node, out) { 6 | if (node.nodeType == 3) return out.push(node.nodeValue); 7 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 8 | textContent(ch, out); 9 | if (isBlock.test(node.nodeType)) out.push("\n"); 10 | } 11 | } 12 | 13 | return function(collection, defaultMode) { 14 | if (!collection) collection = document.body.getElementsByTagName("pre"); 15 | 16 | for (var i = 0; i < collection.length; ++i) { 17 | var node = collection[i]; 18 | var mode = node.getAttribute("data-lang") || defaultMode; 19 | if (!mode) continue; 20 | 21 | var text = []; 22 | textContent(node, text); 23 | node.innerHTML = ""; 24 | CodeMirror.runMode(text.join(""), mode, node); 25 | 26 | node.className += " cm-s-default"; 27 | } 28 | }; 29 | })(); 30 | -------------------------------------------------------------------------------- /js/codemirror/addon/lint/coffeescript-lint.js: -------------------------------------------------------------------------------- 1 | // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js 2 | 3 | // declare global: coffeelint 4 | 5 | CodeMirror.registerHelper("lint", "coffeescript", function(text) { 6 | var found = []; 7 | var parseError = function(err) { 8 | var loc = err.lineNumber; 9 | found.push({from: CodeMirror.Pos(loc-1, 0), 10 | to: CodeMirror.Pos(loc, 0), 11 | severity: err.level, 12 | message: err.message}); 13 | }; 14 | try { 15 | var res = coffeelint.lint(text); 16 | for(var i = 0; i < res.length; i++) { 17 | parseError(res[i]); 18 | } 19 | } catch(e) { 20 | found.push({from: CodeMirror.Pos(e.location.first_line, 0), 21 | to: CodeMirror.Pos(e.location.last_line, e.location.last_column), 22 | severity: 'error', 23 | message: e.message}); 24 | } 25 | return found; 26 | }); 27 | CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated 28 | -------------------------------------------------------------------------------- /js/datatables/Readme.txt: -------------------------------------------------------------------------------- 1 | This DataTables plugin (v1.9.x) for jQuery was developed out of the desire to allow highly configurable access to HTML tables with advanced access features. 2 | 3 | For detailed installation, usage and API instructions, please refer to the DataTables web-pages: http://www.datatables.net 4 | 5 | Questions, feature requests and bug reports (etc) can all be asked on the DataTables forums: http://www.datatables.net/forums/ 6 | 7 | The DataTables source can be found in the media/js/ directory of this archive. 8 | 9 | DataTables is released with dual licensing, using the GPL v2 (license-gpl2.txt) and an BSD style license (license-bsd.txt). You may select which of the two licenses you wish to use DataTables under. Please see the corresponding license file for details of these licenses. You are free to use, modify and distribute this software, but all copyright information must remain. 10 | 11 | If you discover any bugs in DataTables, have any suggestions for improvements or even if you just like using it, please free to get in touch with me: www.datatables.net/contact -------------------------------------------------------------------------------- /js/codemirror/addon/scroll/scrollpastend.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) { 5 | if (old && old != CodeMirror.Init) { 6 | cm.off("change", onChange); 7 | cm.display.lineSpace.parentNode.style.paddingBottom = ""; 8 | cm.state.scrollPastEndPadding = null; 9 | } 10 | if (val) { 11 | cm.on("change", onChange); 12 | updateBottomMargin(cm); 13 | } 14 | }); 15 | 16 | function onChange(cm, change) { 17 | if (CodeMirror.changeEnd(change).line == cm.lastLine()) 18 | updateBottomMargin(cm); 19 | } 20 | 21 | function updateBottomMargin(cm) { 22 | var padding = ""; 23 | if (cm.lineCount() > 1) { 24 | var totalH = cm.display.scroller.clientHeight - 30, 25 | lastLineH = cm.getLineHandle(cm.lastLine()).height; 26 | padding = (totalH - lastLineH) + "px"; 27 | } 28 | if (cm.state.scrollPastEndPadding != padding) { 29 | cm.state.scrollPastEndPadding = padding; 30 | cm.display.lineSpace.parentNode.style.paddingBottom = padding; 31 | cm.setSize(); 32 | } 33 | } 34 | })(); 35 | -------------------------------------------------------------------------------- /js/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 by Marijn Haverbeke and others 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/media/license/Syntax Highlighter: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, 2004 Jim Weirich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/media/license/Syntax Highlighter: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, 2004 Jim Weirich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/media/license/Syntax Highlighter: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, 2004 Jim Weirich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/media/license/Syntax Highlighter: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, 2004 Jim Weirich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/docs/media/license/Syntax Highlighter: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, 2004 Jim Weirich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /components/plot/component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_plot extends component_base{ 26 | 27 | function init(){ 28 | $this->plugins = true; 29 | $this->ordering = true; 30 | $this->form = false; 31 | $this->help = true; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /js/codemirror/addon/display/fullscreen.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { 5 | if (old == CodeMirror.Init) old = false; 6 | if (!old == !val) return; 7 | if (val) setFullscreen(cm); 8 | else setNormal(cm); 9 | }); 10 | 11 | function setFullscreen(cm) { 12 | var wrap = cm.getWrapperElement(); 13 | cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, 14 | width: wrap.style.width, height: wrap.style.height}; 15 | wrap.style.width = wrap.style.height = ""; 16 | wrap.className += " CodeMirror-fullscreen"; 17 | document.documentElement.style.overflow = "hidden"; 18 | cm.refresh(); 19 | } 20 | 21 | function setNormal(cm) { 22 | var wrap = cm.getWrapperElement(); 23 | wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); 24 | document.documentElement.style.overflow = ""; 25 | var info = cm.state.fullScreenRestore; 26 | wrap.style.width = info.width; wrap.style.height = info.height; 27 | window.scrollTo(info.scrollLeft, info.scrollTop); 28 | cm.refresh(); 29 | } 30 | })(); 31 | -------------------------------------------------------------------------------- /components/ordering/component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_ordering extends component_base{ 26 | 27 | function init(){ 28 | $this->plugins = true; 29 | $this->ordering = false; 30 | $this->form = false; 31 | $this->help = true; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /components/filters/component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_filters extends component_base { 26 | 27 | function init(){ 28 | $this->plugins = true; 29 | $this->ordering = true; 30 | $this->form = false; 31 | $this->help = true; 32 | } 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /js/codemirror/addon/tern/worker.js: -------------------------------------------------------------------------------- 1 | // declare global: tern, server 2 | 3 | var server; 4 | 5 | this.onmessage = function(e) { 6 | var data = e.data; 7 | switch (data.type) { 8 | case "init": return startServer(data.defs, data.plugins, data.scripts); 9 | case "add": return server.addFile(data.name, data.text); 10 | case "del": return server.delFile(data.name); 11 | case "req": return server.request(data.body, function(err, reqData) { 12 | postMessage({id: data.id, body: reqData, err: err && String(err)}); 13 | }); 14 | case "getFile": 15 | var c = pending[data.id]; 16 | delete pending[data.id]; 17 | return c(data.err, data.text); 18 | default: throw new Error("Unknown message type: " + data.type); 19 | } 20 | }; 21 | 22 | var nextId = 0, pending = {}; 23 | function getFile(file, c) { 24 | postMessage({type: "getFile", name: file, id: ++nextId}); 25 | pending[nextId] = c; 26 | } 27 | 28 | function startServer(defs, plugins, scripts) { 29 | if (scripts) importScripts.apply(null, scripts); 30 | 31 | server = new tern.Server({ 32 | getFile: getFile, 33 | async: true, 34 | defs: defs, 35 | plugins: plugins 36 | }); 37 | } 38 | 39 | var console = { 40 | log: function(v) { postMessage({type: "debug", message: v}); } 41 | }; 42 | -------------------------------------------------------------------------------- /js/codemirror/addon/hint/anyword-hint.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | var WORD = /[\w$]+/, RANGE = 500; 5 | 6 | CodeMirror.registerHelper("hint", "anyword", function(editor, options) { 7 | var word = options && options.word || WORD; 8 | var range = options && options.range || RANGE; 9 | var cur = editor.getCursor(), curLine = editor.getLine(cur.line); 10 | var start = cur.ch, end = start; 11 | while (end < curLine.length && word.test(curLine.charAt(end))) ++end; 12 | while (start && word.test(curLine.charAt(start - 1))) --start; 13 | var curWord = start != end && curLine.slice(start, end); 14 | 15 | var list = [], seen = {}; 16 | function scan(dir) { 17 | var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir; 18 | for (; line != end; line += dir) { 19 | var text = editor.getLine(line), m; 20 | var re = new RegExp(word.source, "g"); 21 | while (m = re.exec(text)) { 22 | if (line == cur.line && m[0] === curWord) continue; 23 | if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) { 24 | seen[m[0]] = true; 25 | list.push(m[0]); 26 | } 27 | } 28 | } 29 | } 30 | scan(-1); 31 | scan(1); 32 | return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)}; 33 | }); 34 | })(); 35 | -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Table of Contents - documentation 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 |

Table of Contents

26 |
27 |
ColVis

ColVis provides column visiblity control for DataTables

28 |
29 |
30 |
31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /js/datatables/license-bsd.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2010, Allan Jardine 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | * Neither the name of Allan Jardine nor SpryMedia UK may be used to endorse or promote products derived from this software without specific prior written permission. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Table of Contents - documentation 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 |

Table of Contents

26 |
27 |
AutoFill

AutoFill provides Excel like auto fill features for a DataTable

28 |
29 |
30 |
31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Table of Contents - documentation 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 |

Table of Contents

26 |
27 |
ColReorder

ColReorder provides column visiblity control for DataTables

28 |
29 |
30 |
31 | 32 | 39 | 40 | -------------------------------------------------------------------------------- /component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_base { 26 | 27 | var $plugins = false; 28 | var $ordering = false; 29 | var $form = false; 30 | var $help = ''; 31 | 32 | function __construct($report) { 33 | global $DB, $CFG; 34 | 35 | if(is_numeric($report)) 36 | $this->config = $DB->get_record('block_configurable_reports',array('id' => $report)); 37 | else 38 | $this->config = $report; 39 | $this->init(); 40 | } 41 | 42 | function add_form_elements(&$mform,$fullform){ 43 | return false; 44 | } 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /js/codemirror/addon/selection/active-line.js: -------------------------------------------------------------------------------- 1 | // Because sometimes you need to style the cursor's line. 2 | // 3 | // Adds an option 'styleActiveLine' which, when enabled, gives the 4 | // active line's wrapping
the CSS class "CodeMirror-activeline", 5 | // and gives its background
the class "CodeMirror-activeline-background". 6 | 7 | (function() { 8 | "use strict"; 9 | var WRAP_CLASS = "CodeMirror-activeline"; 10 | var BACK_CLASS = "CodeMirror-activeline-background"; 11 | 12 | CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { 13 | var prev = old && old != CodeMirror.Init; 14 | if (val && !prev) { 15 | updateActiveLine(cm); 16 | cm.on("cursorActivity", updateActiveLine); 17 | } else if (!val && prev) { 18 | cm.off("cursorActivity", updateActiveLine); 19 | clearActiveLine(cm); 20 | delete cm.state.activeLine; 21 | } 22 | }); 23 | 24 | function clearActiveLine(cm) { 25 | if ("activeLine" in cm.state) { 26 | cm.removeLineClass(cm.state.activeLine, "wrap", WRAP_CLASS); 27 | cm.removeLineClass(cm.state.activeLine, "background", BACK_CLASS); 28 | } 29 | } 30 | 31 | function updateActiveLine(cm) { 32 | var line = cm.getLineHandleVisualStart(cm.getCursor().line); 33 | if (cm.state.activeLine == line) return; 34 | clearActiveLine(cm); 35 | cm.addLineClass(line, "wrap", WRAP_CLASS); 36 | cm.addLineClass(line, "background", BACK_CLASS); 37 | cm.state.activeLine = line; 38 | } 39 | })(); 40 | -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/css/ColVis.css: -------------------------------------------------------------------------------- 1 | 2 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3 | * ColVis styles 4 | */ 5 | .ColVis { 6 | float: right; 7 | margin-bottom: 1em; 8 | } 9 | 10 | .ColVis_Button { 11 | position: relative; 12 | float: left; 13 | margin-right: 3px; 14 | padding: 3px 5px; 15 | height: 30px; 16 | background-color: #fff; 17 | border: 1px solid #d0d0d0; 18 | cursor: pointer; 19 | *cursor: hand; 20 | } 21 | 22 | button.ColVis_Button::-moz-focus-inner { 23 | border: none !important; 24 | padding: 0; 25 | } 26 | 27 | .ColVis_text_hover { 28 | border: 1px solid #999; 29 | background-color: #f0f0f0; 30 | } 31 | 32 | div.ColVis_collectionBackground { 33 | background-color: black; 34 | z-index: 1100; 35 | } 36 | 37 | div.ColVis_collection { 38 | position: relative; 39 | width: 150px; 40 | background-color: #f3f3f3; 41 | padding: 3px; 42 | border: 1px solid #ccc; 43 | z-index: 1102; 44 | } 45 | 46 | div.ColVis_collection button.ColVis_Button { 47 | background-color: white; 48 | width: 100%; 49 | float: none; 50 | margin-bottom: 2px; 51 | } 52 | 53 | div.ColVis_catcher { 54 | position: absolute; 55 | z-index: 1101; 56 | } 57 | 58 | .disabled { 59 | color: #999; 60 | } 61 | 62 | 63 | 64 | button.ColVis_Button { 65 | text-align: left; 66 | } 67 | 68 | div.ColVis_collection button.ColVis_Button:hover { 69 | border: 1px solid #999; 70 | background-color: #f0f0f0; 71 | } 72 | 73 | span.ColVis_radio { 74 | display: inline-block; 75 | width: 20px; 76 | } 77 | -------------------------------------------------------------------------------- /get_remote_report.php: -------------------------------------------------------------------------------- 1 | 2 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating Configurable Reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | define('AJAX_SCRIPT', true); 26 | require(dirname(dirname(dirname(__FILE__))).'/config.php'); 27 | require_once($CFG->libdir . '/filelib.php'); 28 | 29 | $reportname = required_param('reportname', PARAM_RAW); 30 | 31 | if (!$userandrepo = get_config('block_configurable_reports','sharedsqlrepository')) { 32 | echo json_encode(""); 33 | die; 34 | } 35 | 36 | 37 | $c = new curl(); 38 | $content = $c->get("https://raw.github.com/$userandrepo/master/".$reportname); 39 | list($subject,$description,$sql) = explode('###',$content); 40 | 41 | echo json_encode($sql); 42 | -------------------------------------------------------------------------------- /components/calcs/max/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class max_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this->_customdata['report']->components); 38 | 39 | // buttons 40 | $this->add_action_buttons(true, get_string('add')); 41 | 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /components/calcs/min/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class min_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this->_customdata['report']->components); 38 | // buttons 39 | $this->add_action_buttons(true, get_string('add')); 40 | 41 | } 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /components/calcs/sum/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class sum_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this->_customdata['report']->components); 38 | 39 | // buttons 40 | $this->add_action_buttons(true, get_string('add')); 41 | 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /components/calcs/average/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class average_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this->_customdata['report']->components); 38 | 39 | // buttons 40 | $this->add_action_buttons(true, get_string('add')); 41 | 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /components/conditions/currentuser/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_currentuser extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('currentuser','block_configurable_reports'); 31 | $this->reporttypes = array('users'); 32 | $this->form = false; 33 | } 34 | 35 | function summary($data){ 36 | return get_string('currentuser_summary','block_configurable_reports'); 37 | 38 | } 39 | 40 | // data -> Plugin configuration data 41 | function execute($data,$user,$courseid){ 42 | global $DB; 43 | return array($user->id); 44 | } 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /components/permissions/anyone/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_anyone extends plugin_base{ 28 | 29 | function init(){ 30 | $this->form = false; 31 | $this->unique = true; 32 | $this->fullname = get_string('anyone','block_configurable_reports'); 33 | $this->reporttypes = array('courses','sql','users','timeline','categories'); 34 | } 35 | 36 | function summary($data){ 37 | return get_string('anyone_summary','block_configurable_reports'); 38 | } 39 | 40 | function execute($userid, $context, $data){ 41 | global $DB, $CFG; 42 | 43 | return true; 44 | 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /js/codemirror/addon/fold/comment-fold.js: -------------------------------------------------------------------------------- 1 | CodeMirror.registerHelper("fold", "comment", function(cm, start) { 2 | var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd; 3 | if (!startToken || !endToken) return; 4 | var line = start.line, lineText = cm.getLine(line); 5 | 6 | var startCh; 7 | for (var at = start.ch, pass = 0;;) { 8 | var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1); 9 | if (found == -1) { 10 | if (pass == 1) return; 11 | pass = 1; 12 | at = lineText.length; 13 | continue; 14 | } 15 | if (pass == 1 && found < start.ch) return; 16 | if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { 17 | startCh = found + startToken.length; 18 | break; 19 | } 20 | at = found - 1; 21 | } 22 | 23 | var depth = 1, lastLine = cm.lastLine(), end, endCh; 24 | outer: for (var i = line; i <= lastLine; ++i) { 25 | var text = cm.getLine(i), pos = i == line ? startCh : 0; 26 | for (;;) { 27 | var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); 28 | if (nextOpen < 0) nextOpen = text.length; 29 | if (nextClose < 0) nextClose = text.length; 30 | pos = Math.min(nextOpen, nextClose); 31 | if (pos == text.length) break; 32 | if (pos == nextOpen) ++depth; 33 | else if (!--depth) { end = i; endCh = pos; break outer; } 34 | ++pos; 35 | } 36 | } 37 | if (end == null || line == end && endCh == startCh) return; 38 | return {from: CodeMirror.Pos(line, startCh), 39 | to: CodeMirror.Pos(end, endCh)}; 40 | }); 41 | -------------------------------------------------------------------------------- /js/codemirror/addon/hint/css-hint.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | function getHints(cm) { 5 | var cur = cm.getCursor(), token = cm.getTokenAt(cur); 6 | var inner = CodeMirror.innerMode(cm.getMode(), token.state); 7 | if (inner.mode.name != "css") return; 8 | 9 | // If it's not a 'word-style' token, ignore the token. 10 | if (!/^[\w$_-]*$/.test(token.string)) { 11 | token = { 12 | start: cur.ch, end: cur.ch, string: "", state: token.state, 13 | type: null 14 | }; 15 | var stack = token.state.stack; 16 | var lastToken = stack && stack.length > 0 ? stack[stack.length - 1] : ""; 17 | if (token.string == ":" || lastToken.indexOf("property") == 0) 18 | token.type = "variable"; 19 | else if (token.string == "{" || lastToken.indexOf("rule") == 0) 20 | token.type = "property"; 21 | } 22 | 23 | if (!token.type) 24 | return; 25 | 26 | var spec = CodeMirror.resolveMode("text/css"); 27 | var keywords = null; 28 | if (token.type.indexOf("property") == 0) 29 | keywords = spec.propertyKeywords; 30 | else if (token.type.indexOf("variable") == 0) 31 | keywords = spec.valueKeywords; 32 | 33 | if (!keywords) 34 | return; 35 | 36 | var result = []; 37 | for (var name in keywords) { 38 | if (name.indexOf(token.string) == 0 /* > -1 */) 39 | result.push(name); 40 | } 41 | 42 | return { 43 | list: result, 44 | from: CodeMirror.Pos(cur.line, token.start), 45 | to: CodeMirror.Pos(cur.line, token.end) 46 | }; 47 | } 48 | 49 | CodeMirror.registerHelper("hint", "css", getHints); 50 | })(); 51 | -------------------------------------------------------------------------------- /js/codemirror/keymap/extra.js: -------------------------------------------------------------------------------- 1 | // A number of additional default bindings that are too obscure to 2 | // include in the core codemirror.js file. 3 | 4 | (function() { 5 | "use strict"; 6 | 7 | var Pos = CodeMirror.Pos; 8 | 9 | function moveLines(cm, start, end, dist) { 10 | if (!dist || start > end) return 0; 11 | 12 | var from = cm.clipPos(Pos(start, 0)), to = cm.clipPos(Pos(end)); 13 | var text = cm.getRange(from, to); 14 | 15 | if (start <= cm.firstLine()) 16 | cm.replaceRange("", from, Pos(to.line + 1, 0)); 17 | else 18 | cm.replaceRange("", Pos(from.line - 1), to); 19 | var target = from.line + dist; 20 | if (target <= cm.firstLine()) { 21 | cm.replaceRange(text + "\n", Pos(target, 0)); 22 | return cm.firstLine() - from.line; 23 | } else { 24 | var targetPos = cm.clipPos(Pos(target - 1)); 25 | cm.replaceRange("\n" + text, targetPos); 26 | return targetPos.line + 1 - from.line; 27 | } 28 | } 29 | 30 | function moveSelectedLines(cm, dist) { 31 | var head = cm.getCursor("head"), anchor = cm.getCursor("anchor"); 32 | cm.operation(function() { 33 | var moved = moveLines(cm, Math.min(head.line, anchor.line), Math.max(head.line, anchor.line), dist); 34 | cm.setSelection(Pos(anchor.line + moved, anchor.ch), Pos(head.line + moved, head.ch)); 35 | }); 36 | } 37 | 38 | CodeMirror.commands.moveLinesUp = function(cm) { moveSelectedLines(cm, -1); }; 39 | CodeMirror.commands.moveLinesDown = function(cm) { moveSelectedLines(cm, 1); }; 40 | 41 | CodeMirror.keyMap["default"]["Alt-Up"] = "moveLinesUp"; 42 | CodeMirror.keyMap["default"]["Alt-Down"] = "moveLinesDown"; 43 | })(); 44 | -------------------------------------------------------------------------------- /version.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** 19 | * Version details 20 | * 21 | * Configurable Reports - A Moodle block for creating customizable reports 22 | * 23 | * @package block_configurable_reports 24 | * @author: Juan leyva 25 | * @date: 2013-09-07 26 | * 27 | * @copyright Juan leyva 28 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 29 | */ 30 | 31 | defined('MOODLE_INTERNAL') || die(); 32 | 33 | $plugin->version = 2011040122; // Plugin version. 34 | $plugin->requires = 2011120500; // require Moodle version (2.2). 35 | $plugin->maturity = MATURITY_STABLE; 36 | $plugin->release = '2.3.10'; 37 | $plugin->component = 'block_configurable_reports'; // Full name of the plugin (used for diagnostics) 38 | $plugin->cron = 86400; // = Once in 24h, Set min time between cron executions. 39 | // Should probably be at night to off load CPU load. 40 | -------------------------------------------------------------------------------- /components/conditions/currentreportcourse/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_currentreportcourse extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('currentreportcourse','block_configurable_reports'); 31 | $this->form = false; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | return get_string('currentreportcourse_summary','block_configurable_reports'); 37 | } 38 | 39 | // data -> Plugin configuration data 40 | function execute($data,$user,$courseid){ 41 | global $DB; 42 | 43 | $finalcourses = array(); 44 | $finalcourses[] = $courseid; 45 | 46 | return $finalcourses; 47 | } 48 | 49 | } 50 | 51 | -------------------------------------------------------------------------------- /components/permissions/reportscapabilities/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_reportscapabilities extends plugin_base{ 28 | 29 | function init(){ 30 | $this->form = false; 31 | $this->unique = true; 32 | $this->fullname = get_string('reportscapabilities','block_configurable_reports'); 33 | $this->reporttypes = array('courses','sql','users','timeline','categories'); 34 | } 35 | 36 | function summary($data){ 37 | return get_string('reportscapabilities_summary','block_configurable_reports'); 38 | } 39 | 40 | function execute($userid, $context, $data){ 41 | global $DB, $CFG; 42 | 43 | return has_capability('moodle/site:viewreports', context_system::instance(), $userid); 44 | 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class plugin_base { 26 | 27 | public $fullname = ''; 28 | public $type = ''; 29 | public $report = null; 30 | public $form = false; 31 | public $cache = array(); 32 | public $unique = false; 33 | public $reporttypes = array(); 34 | 35 | public function __construct($report) { 36 | global $DB, $CFG, $remotedb; 37 | 38 | if (is_numeric($report)) { 39 | $this->report = $DB->get_record('block_configurable_reports', array('id' => $report)); 40 | } else { 41 | $this->report = $report; 42 | } 43 | $this->init(); 44 | } 45 | 46 | public function summary($data) { 47 | return ''; 48 | } 49 | 50 | // Should be override. 51 | public function init() { 52 | return ''; 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /reports/users/report.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class report_users extends report_base{ 26 | 27 | function init(){ 28 | $this->components = array('columns','conditions','ordering','filters','template','permissions','calcs','plot'); 29 | } 30 | 31 | function get_all_elements(){ 32 | global $DB; 33 | 34 | $elements = array(); 35 | $rs = $DB->get_recordset('user', null, '', 'id'); 36 | foreach ($rs as $result) { 37 | $elements[] = $result->id; 38 | } 39 | $rs->close(); 40 | return $elements; 41 | } 42 | 43 | function get_rows($elements, $sqlorder = ''){ 44 | global $DB, $CFG; 45 | 46 | if(!empty($elements)){ 47 | list($usql, $params) = $DB->get_in_or_equal($elements); 48 | return $DB->get_records_select('user',"id $usql", $params, $sqlorder); 49 | } 50 | else{ 51 | return array(); 52 | } 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /components/columns/currentuserfinalgrade/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class currentuserfinalgrade_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this); 38 | 39 | // buttons 40 | $this->add_action_buttons(true, get_string('add')); 41 | 42 | } 43 | 44 | function validation($data, $files){ 45 | $errors = parent::validation($data, $files); 46 | 47 | $errors = $this->_customdata['compclass']->validate_form_elements($data,$errors); 48 | 49 | return $errors; 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /components/columns/finalgradeincurrentcourse/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class finalgradeincurrentcourse_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $this->_customdata['compclass']->add_form_elements($mform,$this); 38 | 39 | // buttons 40 | $this->add_action_buttons(true, get_string('add')); 41 | 42 | } 43 | 44 | function validation($data, $files){ 45 | $errors = parent::validation($data, $files); 46 | 47 | $errors = $this->_customdata['compclass']->validate_form_elements($data,$errors); 48 | 49 | return $errors; 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /components/conditions/usersincurrentcourse/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_usersincurrentcourse extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('usersincurrentcourse','block_configurable_reports'); 31 | $this->reporttypes = array('users'); 32 | $this->form = true; 33 | } 34 | 35 | function summary($data){ 36 | return get_string('usersincurrentcourse_summary','block_configurable_reports'); 37 | 38 | } 39 | 40 | // data -> Plugin configuration data 41 | function execute($data,$user,$courseid){ 42 | global $DB; 43 | 44 | $context = cr_get_context(CONTEXT_COURSE,$courseid); 45 | if($users = get_role_users($data->roles, $context, false, 'u.id', 'u.id')){ 46 | return array_keys($users); 47 | } 48 | 49 | return array(); 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /reports/courses/report.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class report_courses extends report_base{ 26 | 27 | function init(){ 28 | $this->components = array('columns','conditions','ordering','filters','template','permissions','calcs','plot'); 29 | } 30 | 31 | function get_all_elements(){ 32 | global $DB; 33 | 34 | $elements = array(); 35 | $rs = $DB->get_recordset('course', null, '', 'id'); 36 | foreach ($rs as $result) { 37 | $elements[] = $result->id; 38 | } 39 | $rs->close(); 40 | return $elements; 41 | } 42 | 43 | function get_rows($elements, $sqlorder = ''){ 44 | global $DB, $CFG; 45 | 46 | $finalelements = array(); 47 | 48 | if(!empty($elements)){ 49 | list($usql, $params) = $DB->get_in_or_equal($elements); 50 | return $DB->get_records_select('course',"id $usql", $params, $sqlorder); 51 | } 52 | 53 | return $finalelements; 54 | } 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /components/permissions/usersincoursereport/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_usersincoursereport extends plugin_base{ 28 | 29 | function init(){ 30 | $this->form = false; 31 | $this->unique = true; 32 | $this->fullname = get_string('usersincoursereport','block_configurable_reports'); 33 | $this->reporttypes = array('courses','sql','users','timeline','categories'); 34 | } 35 | 36 | function summary($data){ 37 | return get_string('usersincoursereport_summary','block_configurable_reports'); 38 | } 39 | 40 | function execute($userid, $context, $data){ 41 | global $DB, $CFG; 42 | 43 | // Everyone should be enrolled at the system level. 44 | if($context == context_system::instance()) { 45 | return true; 46 | } 47 | 48 | return is_enrolled($context, $userid); 49 | 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /list_reports_in_category.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** Configurable Reports 18 | * A Moodle block for creating Configurable Reports 19 | * @package blocks 20 | * @author: Juan leyva 21 | * @date: 2009 22 | */ 23 | 24 | define('AJAX_SCRIPT', true); 25 | require(dirname(dirname(dirname(__FILE__))).'/config.php'); 26 | require_once($CFG->libdir . '/filelib.php'); 27 | 28 | $category = required_param('category', PARAM_RAW); 29 | 30 | if (!$userandrepo = get_config('block_configurable_reports','sharedsqlrepository')) { 31 | echo json_encode(array()); 32 | die; 33 | } 34 | 35 | $c = new curl(); 36 | $res = $c->get("https://api.github.com/repos/$userandrepo/contents/".$category); 37 | 38 | $res = json_decode($res); 39 | 40 | $reportlist = array(); 41 | foreach ($res as $item) { 42 | //echo "[ $item->type , $item->path ]"; 43 | $report = new stdClass(); 44 | $report->name = str_replace($category.'/','',$item->path); 45 | $report->fullname = $item->path; 46 | if ($item->type == 'file') { 47 | $reportlist[] = $report; 48 | } 49 | } 50 | 51 | echo json_encode($reportlist); 52 | -------------------------------------------------------------------------------- /components/permissions/roleincourse/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class roleincourse_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('roleincourse','block_configurable_reports'), ''); 38 | 39 | $roles = $DB->get_records('role'); 40 | 41 | $userroles = array(); 42 | foreach($roles as $r) 43 | $userroles[$r->id] = $r->shortname; 44 | 45 | $mform->addElement('select', 'roleid', get_string('roles'), $userroles); 46 | 47 | 48 | // buttons 49 | $this->add_action_buttons(true, get_string('add')); 50 | 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /edit_form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating Configurable Reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class block_configurable_reports_edit_form extends block_edit_form { 26 | protected function specific_definition($mform) { 27 | 28 | $mform->addElement('header', 'configheader', get_string('blocksettings', 'block')); 29 | 30 | $mform->addElement('text', 'config_title', get_string('name')); 31 | $mform->setType('config_title', PARAM_MULTILANG); 32 | $mform->setDefault('config_title', get_string('pluginname', 'block_configurable_reports')); 33 | 34 | $mform->addElement('selectyesno', 'config_displayreportslist', get_string('displayreportslist', 'block_configurable_reports')); 35 | $mform->setDefault('config_displayreportslist', 1); 36 | 37 | $mform->addElement('selectyesno', 'config_displayglobalreports', get_string('displayglobalreports', 'block_configurable_reports')); 38 | $mform->setDefault('config_displayglobalreports', 1); 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /reports/categories/report.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class report_categories extends report_base{ 26 | 27 | function init(){ 28 | $this->components = array('columns','conditions','ordering','filters','template','permissions','calcs','plot'); 29 | } 30 | 31 | function get_all_elements(){ 32 | global $DB; 33 | 34 | $elements = array(); 35 | $rs = $DB->get_recordset('course_categories', null, '', 'id'); 36 | foreach ($rs as $result) { 37 | $elements[] = $result->id; 38 | } 39 | $rs->close(); 40 | return $elements; 41 | } 42 | 43 | function get_rows($elements, $sqlorder = ''){ 44 | global $DB, $CFG; 45 | 46 | $finalelements = array(); 47 | 48 | if(!empty($elements)){ 49 | list($usql, $params) = $DB->get_in_or_equal($elements); 50 | return $DB->get_records_select('course_categories',"id $usql", $params, $sqlorder); 51 | } 52 | 53 | return $finalelements; 54 | } 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /components/conditions/currentusercourses/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_currentusercourses extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('currentusercourses','block_configurable_reports'); 31 | $this->form = false; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | return get_string('currentusercourses_summary','block_configurable_reports'); 37 | } 38 | 39 | // data -> Plugin configuration data 40 | function execute($data,$user,$courseid){ 41 | global $DB, $CFG; 42 | require_once($CFG->libdir.'/enrollib.php'); 43 | 44 | $finalcourses = array(); 45 | $mycourses = enrol_get_users_courses($user->id); 46 | if(!empty($mycourses)) 47 | $finalcourses = array_keys($mycourses); 48 | 49 | return $finalcourses; 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /components/conditions/coursecategory/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class coursecategory_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | require_once($CFG->dirroot.'/course/lib.php'); 35 | 36 | $mform =& $this->_form; 37 | 38 | $mform->addElement('header', 'crformheader' ,get_string('coursefield','block_configurable_reports'), ''); 39 | 40 | $options = array(get_string('top')); 41 | $parents = array(); 42 | cr_make_categories_list($options, $parents); 43 | $mform->addElement('select', 'categoryid', get_string('category'), $options); 44 | 45 | // buttons 46 | $this->add_action_buttons(true, get_string('add')); 47 | 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /components/conditions/usersincurrentcourse/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class usersincurrentcourse_form extends moodleform { 32 | 33 | function definition() { 34 | global $DB, $USER, $CFG; 35 | 36 | $mform =& $this->_form; 37 | 38 | $mform->addElement('header', 'crformheader' ,get_string('coursefield','block_configurable_reports'), ''); 39 | 40 | $roles = $DB->get_records('role'); 41 | $userroles = array(); 42 | foreach($roles as $r) 43 | $userroles[$r->id] = $r->shortname; 44 | 45 | $mform->addElement('select', 'roles', get_string('roles'), $userroles,array('multiple'=>'multiple')); 46 | 47 | // buttons 48 | $this->add_action_buttons(true, get_string('add')); 49 | 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /js/datatables/extras/AutoFill/media/docs/media/js/shBrushJScript.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'break case catch continue ' + 25 | 'default delete do else false ' + 26 | 'for function if in instanceof ' + 27 | 'new null return super switch ' + 28 | 'this throw true try typeof var while with' 29 | ; 30 | 31 | var r = SyntaxHighlighter.regexLib; 32 | 33 | this.regexList = [ 34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments 37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 40 | ]; 41 | 42 | this.forHtmlScript(r.scriptScriptTags); 43 | }; 44 | 45 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 46 | Brush.aliases = ['js', 'jscript', 'javascript']; 47 | 48 | SyntaxHighlighter.brushes.JScript = Brush; 49 | 50 | // CommonJS 51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 52 | })(); 53 | -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/docs/media/js/shBrushJScript.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'break case catch continue ' + 25 | 'default delete do else false ' + 26 | 'for function if in instanceof ' + 27 | 'new null return super switch ' + 28 | 'this throw true try typeof var while with' 29 | ; 30 | 31 | var r = SyntaxHighlighter.regexLib; 32 | 33 | this.regexList = [ 34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments 37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 40 | ]; 41 | 42 | this.forHtmlScript(r.scriptScriptTags); 43 | }; 44 | 45 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 46 | Brush.aliases = ['js', 'jscript', 'javascript']; 47 | 48 | SyntaxHighlighter.brushes.JScript = Brush; 49 | 50 | // CommonJS 51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 52 | })(); 53 | -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/media/js/shBrushJScript.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'break case catch continue ' + 25 | 'default delete do else false ' + 26 | 'for function if in instanceof ' + 27 | 'new null return super switch ' + 28 | 'this throw true try typeof var while with' 29 | ; 30 | 31 | var r = SyntaxHighlighter.regexLib; 32 | 33 | this.regexList = [ 34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments 37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 40 | ]; 41 | 42 | this.forHtmlScript(r.scriptScriptTags); 43 | }; 44 | 45 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 46 | Brush.aliases = ['js', 'jscript', 'javascript']; 47 | 48 | SyntaxHighlighter.brushes.JScript = Brush; 49 | 50 | // CommonJS 51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 52 | })(); 53 | -------------------------------------------------------------------------------- /js/datatables/extras/Scroller/media/docs/media/js/shBrushJScript.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'break case catch continue ' + 25 | 'default delete do else false ' + 26 | 'for function if in instanceof ' + 27 | 'new null return super switch ' + 28 | 'this throw true try typeof var while with' 29 | ; 30 | 31 | var r = SyntaxHighlighter.regexLib; 32 | 33 | this.regexList = [ 34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments 37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 40 | ]; 41 | 42 | this.forHtmlScript(r.scriptScriptTags); 43 | }; 44 | 45 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 46 | Brush.aliases = ['js', 'jscript', 'javascript']; 47 | 48 | SyntaxHighlighter.brushes.JScript = Brush; 49 | 50 | // CommonJS 51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 52 | })(); 53 | -------------------------------------------------------------------------------- /js/datatables/extras/ColReorder/media/docs/media/js/shBrushJScript.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | var keywords = 'break case catch continue ' + 25 | 'default delete do else false ' + 26 | 'for function if in instanceof ' + 27 | 'new null return super switch ' + 28 | 'this throw true try typeof var while with' 29 | ; 30 | 31 | var r = SyntaxHighlighter.regexLib; 32 | 33 | this.regexList = [ 34 | { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 35 | { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 36 | { regex: r.singleLineCComments, css: 'comments' }, // one line comments 37 | { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 38 | { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 40 | ]; 41 | 42 | this.forHtmlScript(r.scriptScriptTags); 43 | }; 44 | 45 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 46 | Brush.aliases = ['js', 'jscript', 'javascript']; 47 | 48 | SyntaxHighlighter.brushes.JScript = Brush; 49 | 50 | // CommonJS 51 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 52 | })(); 53 | -------------------------------------------------------------------------------- /components/timeline/component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_timeline extends component_base{ 26 | 27 | function init(){ 28 | $this->plugins = false; 29 | $this->ordering = false; 30 | $this->form = true; 31 | $this->help = true; 32 | } 33 | 34 | function form_process_data(&$cform){ 35 | global $DB; 36 | if($this->form){ 37 | $data = $cform->get_data(); 38 | $components = cr_unserialize($this->config->components); 39 | $components['timeline']['config'] = $data; 40 | $this->config->components = cr_serialize($components); 41 | $DB->update_record('block_configurable_reports',$this->config); 42 | } 43 | } 44 | 45 | function form_set_data(&$cform){ 46 | if($this->form){ 47 | $fdata = new stdclass; 48 | $components = cr_unserialize($this->config->components); 49 | $compconfig = (isset($components['timeline']['config']))? $components['timeline']['config'] : new stdclass; 50 | $cform->set_data($compconfig); 51 | } 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /components/conditions/usersincohorts/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class usersincohorts_form extends moodleform { 32 | 33 | function definition() { 34 | global $DB, $USER, $CFG; 35 | 36 | $mform =& $this->_form; 37 | 38 | $mform->addElement('header', 'crformheader' ,get_string('cohorts', 'cohort'), ''); 39 | 40 | $cohorts = $DB->get_records('cohort'); 41 | $usercohorts = array(); 42 | foreach($cohorts as $c) { 43 | $usercohorts[$c->id] = format_string($c->name); 44 | } 45 | 46 | $mform->addElement('select', 'cohorts', get_string('cohorts', 'cohort'), $usercohorts, array('multiple'=>'multiple')); 47 | 48 | // buttons 49 | $this->add_action_buttons(true, get_string('add')); 50 | 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /js/codemirror/addon/display/placeholder.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | CodeMirror.defineOption("placeholder", "", function(cm, val, old) { 3 | var prev = old && old != CodeMirror.Init; 4 | if (val && !prev) { 5 | cm.on("focus", onFocus); 6 | cm.on("blur", onBlur); 7 | cm.on("change", onChange); 8 | onChange(cm); 9 | } else if (!val && prev) { 10 | cm.off("focus", onFocus); 11 | cm.off("blur", onBlur); 12 | cm.off("change", onChange); 13 | clearPlaceholder(cm); 14 | var wrapper = cm.getWrapperElement(); 15 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); 16 | } 17 | 18 | if (val && !cm.hasFocus()) onBlur(cm); 19 | }); 20 | 21 | function clearPlaceholder(cm) { 22 | if (cm.state.placeholder) { 23 | cm.state.placeholder.parentNode.removeChild(cm.state.placeholder); 24 | cm.state.placeholder = null; 25 | } 26 | } 27 | function setPlaceholder(cm) { 28 | clearPlaceholder(cm); 29 | var elt = cm.state.placeholder = document.createElement("pre"); 30 | elt.style.cssText = "height: 0; overflow: visible"; 31 | elt.className = "CodeMirror-placeholder"; 32 | elt.appendChild(document.createTextNode(cm.getOption("placeholder"))); 33 | cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); 34 | } 35 | 36 | function onFocus(cm) { 37 | clearPlaceholder(cm); 38 | } 39 | function onBlur(cm) { 40 | if (isEmpty(cm)) setPlaceholder(cm); 41 | } 42 | function onChange(cm) { 43 | var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); 44 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); 45 | 46 | if (cm.hasFocus()) return; 47 | if (empty) setPlaceholder(cm); 48 | else clearPlaceholder(cm); 49 | } 50 | 51 | function isEmpty(cm) { 52 | return (cm.lineCount() === 1) && (cm.getLine(0) === ""); 53 | } 54 | })(); 55 | -------------------------------------------------------------------------------- /components/columns/roleusersn/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class plugin_roleusersn extends plugin_base{ 26 | 27 | 28 | function init(){ 29 | $this->fullname = get_string('roleusersn','block_configurable_reports'); 30 | $this->type = 'numeric'; 31 | $this->form = true; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | return format_string($data->columname); 37 | } 38 | 39 | function colformat($data){ 40 | $align = (isset($data->align))? $data->align : ''; 41 | $size = (isset($data->size))? $data->size : ''; 42 | $wrap = (isset($data->wrap))? $data->wrap : ''; 43 | return array($align,$size,$wrap); 44 | } 45 | 46 | // data -> Plugin configuration data 47 | // row -> Full course row c->id, c->fullname, etc... 48 | function execute($data,$row,$user,$courseid,$starttime=0,$endtime=0){ 49 | $courseid = $row->id; 50 | $context = cr_get_context(CONTEXT_COURSE,$courseid); 51 | return count_role_users($data->roles,$context); 52 | } 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /components/conditions/coursecategory/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_coursecategory extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('coursecategory','block_configurable_reports'); 31 | $this->type = 'text'; 32 | $this->form = true; 33 | $this->reporttypes = array('courses'); 34 | } 35 | 36 | function summary($data){ 37 | global $DB; 38 | 39 | $cat = $DB->get_record('course_categories',array('id' => $data->categoryid)); 40 | if($cat) 41 | return get_string('category').' '.$cat->name; 42 | else 43 | return get_string('category').' '.get_string('top'); 44 | } 45 | 46 | // data -> Plugin configuration data 47 | function execute($data,$user,$courseid){ 48 | global $DB; 49 | $courses = $DB->get_records('course',array('category' => $data->categoryid)); 50 | if($courses) 51 | return array_keys($courses); 52 | return array(); 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /components/ordering/userfieldorder/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class userfieldorder_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $columns = $DB->get_columns('user'); 38 | 39 | $coursecolumns = array(); 40 | foreach($columns as $c) 41 | $coursecolumns[$c->name] = $c->name; 42 | 43 | $mform->addElement('select', 'column', get_string('column', 'block_configurable_reports'), $coursecolumns); 44 | 45 | $directions = array('asc'=>'ASC', 'desc'=>'DESC'); 46 | $mform->addElement('select', 'direction', get_string('direction','block_configurable_reports'), $directions); 47 | 48 | // buttons 49 | $this->add_action_buttons(true, get_string('add')); 50 | 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /components/ordering/coursefieldorder/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class coursefieldorder_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $columns = $DB->get_columns('course'); 38 | 39 | $coursecolumns = array(); 40 | foreach($columns as $c) 41 | $coursecolumns[$c->name] = $c->name; 42 | 43 | $mform->addElement('select', 'column', get_string('column','block_configurable_reports'), $coursecolumns); 44 | 45 | $directions = array('asc'=>'ASC', 'desc'=>'DESC'); 46 | $mform->addElement('select', 'direction', get_string('direction','block_configurable_reports'), $directions); 47 | 48 | // buttons 49 | $this->add_action_buttons(true, get_string('add')); 50 | 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /components/conditions/usersincohorts/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_usersincohorts extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('usersincohorts','block_configurable_reports'); 31 | $this->reporttypes = array('users'); 32 | $this->form = true; 33 | } 34 | 35 | function summary($data){ 36 | return get_string('usersincohorts_summary','block_configurable_reports'); 37 | 38 | } 39 | 40 | // data -> Plugin configuration data 41 | function execute($data,$user,$courseid){ 42 | global $DB; 43 | 44 | if ($data->cohorts) { 45 | list($insql, $params) = $DB->get_in_or_equal($data->cohorts); 46 | 47 | $sql = "SELECT u.id 48 | FROM {user} u JOIN {cohort_members} c ON c.userid = u.id 49 | WHERE c.cohortid $insql "; 50 | 51 | return array_keys($DB->get_records_sql($sql, $params)); 52 | } 53 | 54 | return array(); 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /components/conditions/coursechild/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_coursechild extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('coursechild','block_configurable_reports'); 31 | $this->form = true; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | global $DB; 37 | $course = $DB->get_record('course',array('id' => $data->courseid)); 38 | if($course) 39 | return get_string('coursechild','block_configurable_reports').' '.(format_string($course->fullname)); 40 | return ''; 41 | } 42 | 43 | // data -> Plugin configuration data 44 | function execute($data,$user,$courseid){ 45 | global $DB; 46 | 47 | $finalcourses = array(); 48 | if($courses = $DB->get_records('course_meta',array('child_course' => $data->courseid))){ 49 | foreach($courses as $c) 50 | $finalcourses[] = $c->parent_course; 51 | } 52 | return $finalcourses; 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /components/ordering/categoryfieldorder/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class categoryfieldorder_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $columns = $DB->get_columns('course_categories'); 38 | 39 | $categorycolumns = array(); 40 | foreach($columns as $c) 41 | $categorycolumns[$c->name] = $c->name; 42 | 43 | $mform->addElement('select', 'column', get_string('column','block_configurable_reports'), $categorycolumns); 44 | 45 | $directions = array('asc'=>'ASC', 'desc'=>'DESC'); 46 | $mform->addElement('select', 'direction', get_string('direction','block_configurable_reports'), $directions); 47 | 48 | // buttons 49 | $this->add_action_buttons(true, get_string('add')); 50 | 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /components/conditions/courseparent/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_courseparent extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('courseparent','block_configurable_reports'); 31 | $this->form = true; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | global $DB; 37 | 38 | $course = $DB->get_record('course',array('id' => $data->courseid)); 39 | if($course) 40 | return get_string('courseparent','block_configurable_reports').' '.(format_string($course->fullname)); 41 | return ''; 42 | } 43 | 44 | // data -> Plugin configuration data 45 | function execute($data,$user,$courseid){ 46 | global $DB; 47 | 48 | $finalcourses = array(); 49 | if($courses = $DB->get_records('course_meta',array('parent_course' => $data->courseid))){ 50 | foreach($courses as $c) 51 | $finalcourses[] = $c->child_course; 52 | } 53 | return $finalcourses; 54 | } 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /components/template/component.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating Configurable Reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | class component_template extends component_base{ 26 | 27 | function init(){ 28 | $this->plugins = false; 29 | $this->ordering = false; 30 | $this->form = true; 31 | $this->help = true; 32 | } 33 | 34 | function form_process_data(&$cform){ 35 | global $DB; 36 | 37 | if($this->form){ 38 | $data = $cform->get_data(); 39 | // cr_serialize() will add slashes 40 | 41 | $components = cr_unserialize($this->config->components); 42 | $components['template']['config'] = $data; 43 | 44 | $this->config->components = cr_serialize($components); 45 | 46 | $DB->update_record('block_configurable_reports',$this->config); 47 | } 48 | } 49 | 50 | function form_set_data(&$cform){ 51 | if($this->form){ 52 | $fdata = new stdclass; 53 | $components = cr_unserialize($this->config->components); 54 | $config = (isset($components['template']['config']))? $components['template']['config'] : new stdclass; 55 | $cform->set_data($config); 56 | } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /components/conditions/parentcategory/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class parentcategory_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | require_once($CFG->dirroot.'/course/lib.php'); 35 | 36 | $mform =& $this->_form; 37 | 38 | $mform->addElement('header', 'crformheader' ,get_string('coursefield','block_configurable_reports'), ''); 39 | 40 | $options = array(get_string('top')); 41 | $parents = array(); 42 | cr_make_categories_list($options, $parents); 43 | $mform->addElement('select', 'categoryid', get_string('category'), $options); 44 | 45 | $mform->addElement('checkbox', 'includesubcats', get_string('includesubcats','block_configurable_reports')); 46 | 47 | // buttons 48 | $this->add_action_buttons(true, get_string('add')); 49 | 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /js/codemirror/addon/mode/loadmode.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js"; 3 | 4 | var loading = {}; 5 | function splitCallback(cont, n) { 6 | var countDown = n; 7 | return function() { if (--countDown == 0) cont(); }; 8 | } 9 | function ensureDeps(mode, cont) { 10 | var deps = CodeMirror.modes[mode].dependencies; 11 | if (!deps) return cont(); 12 | var missing = []; 13 | for (var i = 0; i < deps.length; ++i) { 14 | if (!CodeMirror.modes.hasOwnProperty(deps[i])) 15 | missing.push(deps[i]); 16 | } 17 | if (!missing.length) return cont(); 18 | var split = splitCallback(cont, missing.length); 19 | for (var i = 0; i < missing.length; ++i) 20 | CodeMirror.requireMode(missing[i], split); 21 | } 22 | 23 | CodeMirror.requireMode = function(mode, cont) { 24 | if (typeof mode != "string") mode = mode.name; 25 | if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont); 26 | if (loading.hasOwnProperty(mode)) return loading[mode].push(cont); 27 | 28 | var script = document.createElement("script"); 29 | script.src = CodeMirror.modeURL.replace(/%N/g, mode); 30 | var others = document.getElementsByTagName("script")[0]; 31 | others.parentNode.insertBefore(script, others); 32 | var list = loading[mode] = [cont]; 33 | var count = 0, poll = setInterval(function() { 34 | if (++count > 100) return clearInterval(poll); 35 | if (CodeMirror.modes.hasOwnProperty(mode)) { 36 | clearInterval(poll); 37 | loading[mode] = null; 38 | ensureDeps(mode, function() { 39 | for (var i = 0; i < list.length; ++i) list[i](); 40 | }); 41 | } 42 | }, 200); 43 | }; 44 | 45 | CodeMirror.autoLoadMode = function(instance, mode) { 46 | if (!CodeMirror.modes.hasOwnProperty(mode)) 47 | CodeMirror.requireMode(mode, function() { 48 | instance.setOption("mode", instance.getOption("mode")); 49 | }); 50 | }; 51 | }()); 52 | -------------------------------------------------------------------------------- /components/conditions/coursechild/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class coursechild_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('coursechild','block_configurable_reports'), ''); 38 | 39 | $options = array(); 40 | $options[0] = get_string('choose'); 41 | 42 | if($courses = $DB->get_records_sql('SELECT c.id, fullname FROM {course} c, {course_meta} cm WHERE c.id = cm.child_course GROUP BY (child_course)')){ 43 | foreach($courses as $c){ 44 | $options[$c->id] = format_string($c->fullname); 45 | } 46 | } 47 | 48 | $mform->addElement('select', 'courseid', get_string('course'), $options); 49 | 50 | // buttons 51 | $this->add_action_buttons(true, get_string('add')); 52 | 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /components/conditions/courseparent/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class courseparent_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('courseparent','block_configurable_reports'), ''); 38 | 39 | $options = array(); 40 | $options[0] = get_string('choose'); 41 | 42 | if($courses = $DB->get_records_sql('SELECT c.id, fullname FROM {course} c, {course_meta} cm WHERE c.id = cm.parent_course GROUP BY (parent_course)')){ 43 | foreach($courses as $c){ 44 | $options[$c->id] = format_string($c->fullname); 45 | } 46 | } 47 | 48 | $mform->addElement('select', 'courseid', get_string('course'), $options); 49 | 50 | // buttons 51 | $this->add_action_buttons(true, get_string('add')); 52 | 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /import_form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating Configurable Reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class import_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'importreport', get_string('importreport', 'block_configurable_reports')); 38 | 39 | $mform->addElement('filepicker', 'userfile', get_string('file')); 40 | $mform->setType('userfile', PARAM_FILE); 41 | $mform->addRule('userfile', null, 'required'); 42 | 43 | $mform->addElement('hidden','courseid', $this->_customdata); 44 | $mform->setType('courseid', PARAM_INT); 45 | 46 | // buttons 47 | $this->add_action_buttons(false, get_string('importreport', 'block_configurable_reports')); 48 | 49 | } 50 | 51 | function validation($data, $files){ 52 | $errors = parent::validation($data, $files); 53 | 54 | return $errors; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /components/filters/fcoursefield/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class fcoursefield_form extends moodleform { 32 | function definition() { 33 | global $remotedb, $course, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('fcoursefield','block_configurable_reports'), ''); 38 | 39 | $this->_customdata['compclass']->add_form_elements($mform,$this); 40 | 41 | $columns = $remotedb->get_columns('course'); 42 | 43 | $coursecolumns = array(); 44 | foreach($columns as $c) 45 | $coursecolumns[$c->name] = $c->name; 46 | 47 | unset($coursecolumns['password']); 48 | unset($coursecolumns['sesskey']); 49 | 50 | $mform->addElement('select', 'field', get_string('field','block_configurable_reports'), $coursecolumns); 51 | 52 | 53 | // buttons 54 | $this->add_action_buttons(true, get_string('add')); 55 | 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /components/ordering/userfieldorder/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_userfieldorder extends plugin_base{ 28 | 29 | var $sql = true; 30 | 31 | function init(){ 32 | $this->fullname = get_string('userfield','block_configurable_reports'); 33 | $this->form = true; 34 | $this->unique = true; 35 | $this->reporttypes = array('users'); 36 | $this->sql = true; 37 | } 38 | 39 | function summary($data){ 40 | return get_string($data->column).' '.(strtoupper($data->direction)); 41 | } 42 | 43 | // data -> Plugin configuration data 44 | function execute($data){ 45 | global $DB, $CFG; 46 | 47 | if($data->direction == 'asc' || $data->direction == 'desc'){ 48 | $direction = strtoupper($data->direction); 49 | $columns = $DB->get_columns('user'); 50 | 51 | $coursecolumns = array(); 52 | foreach($columns as $c) 53 | $coursecolumns[$c->name] = $c->name; 54 | 55 | if(isset($coursecolumns[$data->column])){ 56 | return $data->column.' '.$direction; 57 | } 58 | } 59 | 60 | return ''; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/ordering/coursefieldorder/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_coursefieldorder extends plugin_base{ 28 | 29 | var $sql = true; 30 | 31 | function init(){ 32 | $this->fullname = get_string('coursefield','block_configurable_reports'); 33 | $this->form = true; 34 | $this->unique = true; 35 | $this->reporttypes = array('courses'); 36 | $this->sql = true; 37 | } 38 | 39 | function summary($data){ 40 | return get_string($data->column).' '.(strtoupper($data->direction)); 41 | } 42 | 43 | // data -> Plugin configuration data 44 | function execute($data){ 45 | global $DB, $CFG; 46 | 47 | if($data->direction == 'asc' || $data->direction == 'desc'){ 48 | $direction = strtoupper($data->direction); 49 | $columns = $DB->get_columns('course'); 50 | 51 | $coursecolumns = array(); 52 | foreach($columns as $c) 53 | $coursecolumns[$c->name] = $c->name; 54 | 55 | if(isset($coursecolumns[$data->column])){ 56 | return $data->column.' '.$direction; 57 | } 58 | } 59 | 60 | return ''; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/ordering/categoryfieldorder/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_categoryfieldorder extends plugin_base{ 28 | 29 | var $sql = true; 30 | 31 | function init(){ 32 | $this->fullname = get_string('categoryfield','block_configurable_reports'); 33 | $this->form = true; 34 | $this->unique = true; 35 | $this->reporttypes = array('categories'); 36 | $this->sql = true; 37 | } 38 | 39 | function summary($data){ 40 | return $data->column.' '.(strtoupper($data->direction)); 41 | } 42 | 43 | // data -> Plugin configuration data 44 | function execute($data){ 45 | global $DB, $CFG; 46 | 47 | if($data->direction == 'asc' || $data->direction == 'desc'){ 48 | $direction = strtoupper($data->direction); 49 | $columns = $DB->get_columns('course_categories'); 50 | 51 | $categorycolumns = array(); 52 | foreach($columns as $c) 53 | $categorycolumns[$c->name] = $c->name; 54 | 55 | if(isset($categorycolumns[$data->column])){ 56 | return $data->column.' '.$direction; 57 | } 58 | } 59 | 60 | return ''; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /export/csv/export.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | function export_report($report){ 26 | global $DB, $CFG; 27 | require_once($CFG->libdir . '/csvlib.class.php'); 28 | 29 | $table = $report->table; 30 | $matrix = array(); 31 | $filename = 'report'; 32 | 33 | if (!empty($table->head)) { 34 | $countcols = count($table->head); 35 | $keys=array_keys($table->head); 36 | $lastkey = end($keys); 37 | foreach ($table->head as $key => $heading) { 38 | $matrix[0][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($heading)))); 39 | } 40 | } 41 | 42 | if (!empty($table->data)) { 43 | foreach ($table->data as $rkey => $row) { 44 | foreach ($row as $key => $item) { 45 | $matrix[$rkey + 1][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($item)))); 46 | } 47 | } 48 | } 49 | 50 | $csvexport = new csv_export_writer(); 51 | $csvexport->set_filename($filename); 52 | 53 | foreach($matrix as $ri=>$col){ 54 | $csvexport->add_data($col); 55 | } 56 | $csvexport->download_file(); 57 | exit; 58 | } 59 | -------------------------------------------------------------------------------- /js/datatables/extras/FixedColumns/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Table of Contents - documentation 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 |

Table of Contents

26 |
27 |
FixedColumns

When making use of DataTables' x-axis scrolling feature, you may wish to 28 | fix the left most column in place. This plug-in for DataTables provides 29 | exactly this option (note for non-scrolling tables, please use the
30 | FixedHeader plug-in, which can fix headers, footers and columns). Key 31 | features include: 32 |

    33 |
  • Freezes the left or right most columns to the side of the table
  • 34 |
  • Option to freeze two or more columns
  • 35 |
  • Full integration with DataTables' scrolling options
  • 36 |
  • Speed - FixedColumns is fast in its operation
  • 37 |

38 |
39 |
40 |
41 | 42 | 49 | 50 | -------------------------------------------------------------------------------- /js/codemirror/addon/edit/matchtags.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | CodeMirror.defineOption("matchTags", false, function(cm, val, old) { 5 | if (old && old != CodeMirror.Init) { 6 | cm.off("cursorActivity", doMatchTags); 7 | cm.off("viewportChange", maybeUpdateMatch); 8 | clear(cm); 9 | } 10 | if (val) { 11 | cm.state.matchBothTags = typeof val == "object" && val.bothTags; 12 | cm.on("cursorActivity", doMatchTags); 13 | cm.on("viewportChange", maybeUpdateMatch); 14 | doMatchTags(cm); 15 | } 16 | }); 17 | 18 | function clear(cm) { 19 | if (cm.state.tagHit) cm.state.tagHit.clear(); 20 | if (cm.state.tagOther) cm.state.tagOther.clear(); 21 | cm.state.tagHit = cm.state.tagOther = null; 22 | } 23 | 24 | function doMatchTags(cm) { 25 | cm.state.failedTagMatch = false; 26 | cm.operation(function() { 27 | clear(cm); 28 | if (cm.somethingSelected()) return; 29 | var cur = cm.getCursor(), range = cm.getViewport(); 30 | range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to); 31 | var match = CodeMirror.findMatchingTag(cm, cur, range); 32 | if (!match) return; 33 | if (cm.state.matchBothTags) { 34 | var hit = match.at == "open" ? match.open : match.close; 35 | if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"}); 36 | } 37 | var other = match.at == "close" ? match.open : match.close; 38 | if (other) 39 | cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"}); 40 | else 41 | cm.state.failedTagMatch = true; 42 | }); 43 | } 44 | 45 | function maybeUpdateMatch(cm) { 46 | if (cm.state.failedTagMatch) doMatchTags(cm); 47 | } 48 | 49 | CodeMirror.commands.toMatchingTag = function(cm) { 50 | var found = CodeMirror.findMatchingTag(cm, cm.getCursor()); 51 | if (found) { 52 | var other = found.at == "close" ? found.open : found.close; 53 | if (other) cm.setSelection(other.to, other.from); 54 | } 55 | }; 56 | })(); 57 | -------------------------------------------------------------------------------- /components/conditions/ccoursefield/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_ccoursefield extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('ccoursefield','block_configurable_reports'); 31 | $this->reporttypes = array('courses'); 32 | $this->form = true; 33 | } 34 | 35 | function summary($data){ 36 | return get_string($data->field).' '.$data->operator.' '.$data->value; 37 | 38 | } 39 | 40 | // data -> Plugin configuration data 41 | function execute($data,$user,$courseid){ 42 | global $DB; 43 | 44 | $data->value = $data->value; 45 | $ilike = " LIKE "; // TODO - Use $DB->sql_like() 46 | 47 | switch($data->operator){ 48 | case 'LIKE % %': $sql = "$data->field $ilike ?"; 49 | $params = array("%$data->value%"); 50 | break; 51 | default: $sql = "$data->field $data->operator ?"; 52 | $params = array($data->value); 53 | } 54 | 55 | $courses = $DB->get_records_select('course',$sql, $params); 56 | 57 | if($courses) 58 | return array_keys($courses); 59 | 60 | return array(); 61 | } 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /components/columns/roleusersn/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class roleusersn_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('roleusersn','block_configurable_reports'), ''); 38 | 39 | $roles = $DB->get_records('role'); 40 | 41 | $userroles = array(); 42 | foreach($roles as $r) 43 | $userroles[$r->id] = $r->shortname; 44 | 45 | $mform->addElement('select', 'roles', get_string('roles'), $userroles,array('multiple'=>'multiple')); 46 | 47 | $this->_customdata['compclass']->add_form_elements($mform,$this); 48 | 49 | // buttons 50 | $this->add_action_buttons(true, get_string('add')); 51 | 52 | } 53 | 54 | function validation($data, $files){ 55 | $errors = parent::validation($data, $files); 56 | 57 | $errors = $this->_customdata['compclass']->validate_form_elements($data,$errors); 58 | 59 | return $errors; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /js/codemirror/addon/runmode/runmode.js: -------------------------------------------------------------------------------- 1 | CodeMirror.runMode = function(string, modespec, callback, options) { 2 | var mode = CodeMirror.getMode(CodeMirror.defaults, modespec); 3 | var ie = /MSIE \d/.test(navigator.userAgent); 4 | var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9); 5 | 6 | if (callback.nodeType == 1) { 7 | var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize; 8 | var node = callback, col = 0; 9 | node.innerHTML = ""; 10 | callback = function(text, style) { 11 | if (text == "\n") { 12 | // Emitting LF or CRLF on IE8 or earlier results in an incorrect display. 13 | // Emitting a carriage return makes everything ok. 14 | node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text)); 15 | col = 0; 16 | return; 17 | } 18 | var content = ""; 19 | // replace tabs 20 | for (var pos = 0;;) { 21 | var idx = text.indexOf("\t", pos); 22 | if (idx == -1) { 23 | content += text.slice(pos); 24 | col += text.length - pos; 25 | break; 26 | } else { 27 | col += idx - pos; 28 | content += text.slice(pos, idx); 29 | var size = tabSize - col % tabSize; 30 | col += size; 31 | for (var i = 0; i < size; ++i) content += " "; 32 | pos = idx + 1; 33 | } 34 | } 35 | 36 | if (style) { 37 | var sp = node.appendChild(document.createElement("span")); 38 | sp.className = "cm-" + style.replace(/ +/g, " cm-"); 39 | sp.appendChild(document.createTextNode(content)); 40 | } else { 41 | node.appendChild(document.createTextNode(content)); 42 | } 43 | }; 44 | } 45 | 46 | var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); 47 | for (var i = 0, e = lines.length; i < e; ++i) { 48 | if (i) callback("\n"); 49 | var stream = new CodeMirror.StringStream(lines[i]); 50 | while (!stream.eol()) { 51 | var style = mode.token(stream, state); 52 | callback(stream.current(), style, i, stream.start, state); 53 | stream.start = stream.pos; 54 | } 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /components/columns/coursefield/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class coursefield_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('coursefield','block_configurable_reports'), ''); 38 | 39 | $columns = $DB->get_columns('course'); 40 | 41 | $coursecolumns = array(); 42 | foreach($columns as $c) 43 | $coursecolumns[$c->name] = $c->name; 44 | 45 | $mform->addElement('select', 'column', get_string('column','block_configurable_reports'), $coursecolumns); 46 | 47 | $this->_customdata['compclass']->add_form_elements($mform,$this); 48 | 49 | // buttons 50 | $this->add_action_buttons(true, get_string('add')); 51 | 52 | } 53 | 54 | function validation($data, $files){ 55 | $errors = parent::validation($data, $files); 56 | 57 | $errors = $this->_customdata['compclass']->validate_form_elements($data,$errors); 58 | 59 | return $errors; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/columns/finalgradeincurrentcourse/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_finalgradeincurrentcourse extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('finalgradeincurrentcourse','block_configurable_reports'); 31 | $this->form = true; 32 | $this->reporttypes = array('users'); 33 | } 34 | 35 | function summary($data){ 36 | return format_string($data->columname); 37 | } 38 | 39 | function colformat($data){ 40 | $align = (isset($data->align))? $data->align : ''; 41 | $size = (isset($data->size))? $data->size : ''; 42 | $wrap = (isset($data->wrap))? $data->wrap : ''; 43 | return array($align,$size,$wrap); 44 | } 45 | 46 | // data -> Plugin configuration data 47 | // row -> Complet course row c->id, c->fullname, etc... 48 | function execute($data,$row,$user,$courseid,$starttime=0,$endtime=0){ 49 | global $DB, $USER, $CFG; 50 | 51 | $userid = $row->id; 52 | require_once($CFG->libdir.'/gradelib.php'); 53 | require_once($CFG->dirroot.'/grade/querylib.php'); 54 | 55 | if($grade = grade_get_course_grade($userid, $courseid)){ 56 | return $grade->grade; 57 | } 58 | 59 | return ''; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/permissions/roleincourse/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_roleincourse extends plugin_base{ 28 | 29 | function init(){ 30 | $this->form = true; 31 | $this->unique = false; 32 | $this->fullname = get_string('roleincourse','block_configurable_reports'); 33 | $this->reporttypes = array('courses','sql','users','timeline','categories'); 34 | } 35 | 36 | function summary($data){ 37 | global $DB; 38 | 39 | $rolename = $DB->get_field('role', 'shortname', array('id' => $data->roleid)); 40 | $coursename = $DB->get_field('course', 'fullname', array('id' => $this->report->courseid)); 41 | return $rolename.' '.$coursename; 42 | } 43 | 44 | function execute($userid, $context, $data){ 45 | //global $DB, $CFG, $COURSE; 46 | 47 | //$context = ($this->report->courseid == SITEID) ? context_system::instance() : context_course::instance($this->report->courseid); 48 | //$context = context_course::instance($COURSE->id); 49 | $roles = get_user_roles($context, $userid); 50 | if(!empty($roles)){ 51 | foreach($roles as $rol){ 52 | if($rol->roleid == $data->roleid) 53 | return true; 54 | } 55 | } 56 | return false; 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /components/columns/categoryfield/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class categoryfield_form extends moodleform { 32 | function definition() { 33 | global $DB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', 'crformheader' ,get_string('categoryfield','block_configurable_reports'), ''); 38 | 39 | $columns = $DB->get_columns('course_categories'); 40 | 41 | $coursecolumns = array(); 42 | foreach($columns as $c) 43 | $coursecolumns[$c->name] = $c->name; 44 | 45 | $mform->addElement('select', 'column', get_string('column','block_configurable_reports'), $coursecolumns); 46 | 47 | $this->_customdata['compclass']->add_form_elements($mform,$this); 48 | 49 | // buttons 50 | $this->add_action_buttons(true, get_string('add')); 51 | 52 | } 53 | 54 | function validation($data, $files){ 55 | $errors = parent::validation($data, $files); 56 | 57 | $errors = $this->_customdata['compclass']->validate_form_elements($data,$errors); 58 | 59 | return $errors; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/columns/currentuserfinalgrade/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_currentuserfinalgrade extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('currentuserfinalgrade','block_configurable_reports'); 31 | $this->form = true; 32 | $this->reporttypes = array('courses'); 33 | } 34 | 35 | function summary($data){ 36 | return format_string($data->columname); 37 | } 38 | 39 | function colformat($data){ 40 | $align = (isset($data->align))? $data->align : ''; 41 | $size = (isset($data->size))? $data->size : ''; 42 | $wrap = (isset($data->wrap))? $data->wrap : ''; 43 | return array($align,$size,$wrap); 44 | } 45 | 46 | // data -> Plugin configuration data 47 | // row -> Complet course row c->id, c->fullname, etc... 48 | function execute($data,$row,$user,$courseid,$starttime=0,$endtime=0){ 49 | global $DB, $USER, $CFG; 50 | 51 | $courseid = $row->id; 52 | require_once($CFG->libdir.'/gradelib.php'); 53 | require_once($CFG->dirroot.'/grade/querylib.php'); 54 | 55 | if($grade = grade_get_course_grade($user->id, $courseid)){ 56 | return $grade->grade; 57 | } 58 | 59 | return ''; 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /js/codemirror/addon/tern/tern.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-Tern-completion { 2 | padding-left: 22px; 3 | position: relative; 4 | } 5 | .CodeMirror-Tern-completion:before { 6 | position: absolute; 7 | left: 2px; 8 | bottom: 2px; 9 | border-radius: 50%; 10 | font-size: 12px; 11 | font-weight: bold; 12 | height: 15px; 13 | width: 15px; 14 | line-height: 16px; 15 | text-align: center; 16 | color: white; 17 | -moz-box-sizing: border-box; 18 | box-sizing: border-box; 19 | } 20 | .CodeMirror-Tern-completion-unknown:before { 21 | content: "?"; 22 | background: #4bb; 23 | } 24 | .CodeMirror-Tern-completion-object:before { 25 | content: "O"; 26 | background: #77c; 27 | } 28 | .CodeMirror-Tern-completion-fn:before { 29 | content: "F"; 30 | background: #7c7; 31 | } 32 | .CodeMirror-Tern-completion-array:before { 33 | content: "A"; 34 | background: #c66; 35 | } 36 | .CodeMirror-Tern-completion-number:before { 37 | content: "1"; 38 | background: #999; 39 | } 40 | .CodeMirror-Tern-completion-string:before { 41 | content: "S"; 42 | background: #999; 43 | } 44 | .CodeMirror-Tern-completion-bool:before { 45 | content: "B"; 46 | background: #999; 47 | } 48 | 49 | .CodeMirror-Tern-completion-guess { 50 | color: #999; 51 | } 52 | 53 | .CodeMirror-Tern-tooltip { 54 | border: 1px solid silver; 55 | border-radius: 3px; 56 | color: #444; 57 | padding: 2px 5px; 58 | font-size: 90%; 59 | font-family: monospace; 60 | background-color: white; 61 | white-space: pre-wrap; 62 | 63 | max-width: 40em; 64 | position: absolute; 65 | z-index: 10; 66 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 67 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 68 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 69 | 70 | transition: opacity 1s; 71 | -moz-transition: opacity 1s; 72 | -webkit-transition: opacity 1s; 73 | -o-transition: opacity 1s; 74 | -ms-transition: opacity 1s; 75 | } 76 | 77 | .CodeMirror-Tern-hint-doc { 78 | max-width: 25em; 79 | } 80 | 81 | .CodeMirror-Tern-fname { color: black; } 82 | .CodeMirror-Tern-farg { color: #70a; } 83 | .CodeMirror-Tern-farg-current { text-decoration: underline; } 84 | .CodeMirror-Tern-type { color: #07c; } 85 | .CodeMirror-Tern-fhint-guess { opacity: .7; } 86 | -------------------------------------------------------------------------------- /repository.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** Configurable Reports 18 | * A Moodle block for creating Configurable Reports 19 | * @package blocks 20 | * @author: Juan leyva 21 | * @date: 2009 22 | */ 23 | 24 | define('AJAX_SCRIPT', true); 25 | require(dirname(dirname(dirname(__FILE__))).'/config.php'); 26 | require_once($CFG->libdir . '/filelib.php'); 27 | 28 | $action = required_param('action', PARAM_ALPHA); 29 | 30 | if (!$userandrepo = get_config('block_configurable_reports','crrepository')) { 31 | echo json_encode(array()); 32 | die; 33 | } 34 | 35 | $c = new curl(); 36 | if ($action == 'listreports') { 37 | if ($res = $c->get("https://api.github.com/repos/$userandrepo/contents/")) { 38 | $data = json_decode($res); 39 | if (!is_array($data)) { 40 | echo json_encode(array()); 41 | die; 42 | } 43 | foreach ($data as $key => $d) { 44 | if ($d->type != 'dir') { 45 | unset($data[$key]); 46 | } 47 | } 48 | echo json_encode($data); 49 | die; 50 | } 51 | } else if ($action == 'listcategory') { 52 | $category = required_param('category', PARAM_RAW); 53 | if ($res = $c->get("https://api.github.com/repos/$userandrepo/contents/$category")) { 54 | $data = json_decode($res); 55 | foreach ($data as $key => $d) { 56 | if ($d->type != 'file') { 57 | unset($data[$key]); 58 | } 59 | } 60 | echo json_encode($data); 61 | die; 62 | } 63 | } 64 | echo json_encode(array()); 65 | -------------------------------------------------------------------------------- /components/filters/fsearchuserfield/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class fsearchuserfield_form extends moodleform { 32 | function definition() { 33 | global $remoteDB, $USER, $CFG; 34 | 35 | $mform =& $this->_form; 36 | 37 | $mform->addElement('header', '', get_string('fsearchuserfield','block_configurable_reports'), ''); 38 | 39 | $this->_customdata['compclass']->add_form_elements($mform,$this); 40 | 41 | $columns = $remoteDB->get_columns('user'); 42 | 43 | $usercolumns = array(); 44 | foreach($columns as $c) 45 | $usercolumns[$c->name] = $c->name; 46 | 47 | if($profile = $remoteDB->get_records('user_info_field')) 48 | foreach($profile as $p) 49 | $usercolumns['profile_'.$p->shortname] = $p->name; 50 | 51 | unset($usercolumns['password']); 52 | unset($usercolumns['sesskey']); 53 | 54 | $mform->addElement('select', 'field', get_string('field','block_configurable_reports'), $usercolumns); 55 | 56 | 57 | // buttons 58 | $this->add_action_buttons(true, get_string('add')); 59 | 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /components/columns/date/plugin.class.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | require_once($CFG->dirroot.'/blocks/configurable_reports/plugin.class.php'); 26 | 27 | class plugin_date extends plugin_base{ 28 | 29 | function init(){ 30 | $this->fullname = get_string('date','block_configurable_reports'); 31 | $this->type = 'undefined'; 32 | $this->form = true; 33 | $this->reporttypes = array('timeline'); 34 | } 35 | 36 | function summary($data){ 37 | return format_string($data->columname); 38 | } 39 | 40 | function colformat($data){ 41 | $align = (isset($data->align))? $data->align : ''; 42 | $size = (isset($data->size))? $data->size : ''; 43 | $wrap = (isset($data->wrap))? $data->wrap : ''; 44 | return array($align,$size,$wrap); 45 | } 46 | 47 | // data -> Plugin configuration data 48 | // row -> Complet course row c->id, c->fullname, etc... 49 | function execute($data,$row,$user,$courseid,$starttime=0,$endtime=0){ 50 | $date = ($data->date == 'starttime')? $row->starttime: $row->endtime; 51 | 52 | $format = (isset($data->dateformat))? $data->dateformat: ''; 53 | $format = ($data->dateformat == 'custom')? $data->customdateformat : $format; 54 | $format = preg_replace('/[^a-zA-Z%]/i','', $format); 55 | 56 | return userdate($date,$format); 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /tabs.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | $top = array(); 30 | 31 | $top[] = new tabobject('viewreport', new moodle_url('/blocks/configurable_reports/viewreport.php', 32 | array('id' => $report->id, 'courseid'=>$COURSE->id)), 33 | get_string('viewreport','block_configurable_reports')); 34 | 35 | foreach($reportclass->components as $comptab){ 36 | $top[] = new tabobject($comptab, new moodle_url('/blocks/configurable_reports/editcomp.php', 37 | array('id' => $report->id, 'comp' => $comptab, 'courseid'=>$COURSE->id)), 38 | get_string($comptab,'block_configurable_reports')); 39 | } 40 | 41 | $top[] = new tabobject('report', new moodle_url('/blocks/configurable_reports/editreport.php', 42 | array('id' => $report->id, 'courseid'=>$COURSE->id)), 43 | get_string('report','block_configurable_reports')); 44 | 45 | $top[] = new tabobject('managereports', new moodle_url('/blocks/configurable_reports/managereport.php', array('courseid' => $course->id)), 46 | get_string('managereports','block_configurable_reports')); 47 | 48 | $tabs = array($top); 49 | 50 | print_tabs($tabs, $currenttab); 51 | 52 | 53 | -------------------------------------------------------------------------------- /js/datatables/extras/ColVis/media/css/ColVisAlt.css: -------------------------------------------------------------------------------- 1 | /* 2 | * An alternative styling for ColVis 3 | * Note you will likely have to change the path for the background image used by jQuery UI theming: 4 | * ../../../../examples/examples_support/themes/smoothness 5 | */ 6 | 7 | .ColVis { 8 | position: absolute; 9 | right: 0; 10 | top: 0; 11 | width: 15px; 12 | height: 30px; 13 | } 14 | 15 | .ColVis_MasterButton { 16 | height: 100%; 17 | width: 100%; 18 | border-left-width: 0; 19 | cursor: pointer; 20 | *cursor: hand; 21 | background: url('../images/button.png') no-repeat top left; 22 | } 23 | 24 | button.ColVis_Button::-moz-focus-inner { 25 | border: none !important; 26 | padding: 0; 27 | } 28 | 29 | .ColVis_text_hover { 30 | border: 1px solid #999; 31 | background-color: #f0f0f0; 32 | } 33 | 34 | div.ColVis_collectionBackground { 35 | background-color: black; 36 | z-index: 1100; 37 | } 38 | 39 | div.ColVis_collection { 40 | position: relative; 41 | width: 150px; 42 | background-color: #f9f9f9; 43 | padding: 3px; 44 | border: 1px solid #ccc; 45 | z-index: 1102; 46 | } 47 | 48 | div.ColVis_collection button.ColVis_Button { 49 | height: 30px; 50 | width: 100%; 51 | margin-right: 3px; 52 | margin-bottom: 2px; 53 | padding: 3px 5px; 54 | cursor: pointer; 55 | *cursor: hand; 56 | text-align: left; 57 | } 58 | 59 | div.ColVis_collection button.ColVis_Button:hover { 60 | border: 1px solid #999; 61 | background-color: #f0f0f0; 62 | } 63 | 64 | div.ColVis_catcher { 65 | position: absolute; 66 | z-index: 1101; 67 | } 68 | 69 | span.ColVis_radio { 70 | display: inline-block; 71 | width: 20px; 72 | } 73 | 74 | button.ColVis_Restore { 75 | margin-top: 15px; 76 | } 77 | 78 | button.ColVis_Restore span { 79 | display: inline-block; 80 | padding-left: 10px; 81 | text-align: left; 82 | } 83 | 84 | .disabled { 85 | color: #999; 86 | } 87 | 88 | 89 | 90 | /* 91 | * Styles needed for DataTables scrolling 92 | */ 93 | div.dataTables_scrollHead { 94 | position: relative; 95 | overflow: hidden; 96 | } 97 | 98 | div.dataTables_scrollBody { 99 | overflow-y: scroll; 100 | } 101 | 102 | div.dataTables_scrollFoot { 103 | overflow: hidden; 104 | } 105 | -------------------------------------------------------------------------------- /components/filters/fuserfield/form.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | if (!defined('MOODLE_INTERNAL')) { 26 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page 27 | } 28 | 29 | require_once($CFG->libdir.'/formslib.php'); 30 | 31 | class fuserfield_form extends moodleform { 32 | 33 | function definition() { 34 | 35 | global $remotedb; 36 | 37 | $mform =& $this->_form; 38 | 39 | $mform->addElement('header', 'crformheader' ,get_string('fuserfield','block_configurable_reports'), ''); 40 | 41 | $this->_customdata['compclass']->add_form_elements($mform,$this); 42 | 43 | $columns = $remotedb->get_columns('user'); 44 | 45 | $usercolumns = array(); 46 | foreach($columns as $c) 47 | $usercolumns[$c->name] = $c->name; 48 | 49 | if($profile = $remotedb->get_records('user_info_field')) 50 | foreach($profile as $p) 51 | $usercolumns['profile_'.$p->shortname] = $p->name; 52 | 53 | unset($usercolumns['password']); 54 | unset($usercolumns['sesskey']); 55 | 56 | $mform->addElement('select', 'field', get_string('field','block_configurable_reports'), $usercolumns); 57 | 58 | $mform->addElement('advcheckbox', 'excludedeletedusers', get_string('excludedeletedusers', 'block_configurable_reports')); 59 | 60 | // Buttons. 61 | $this->add_action_buttons(true, get_string('add')); 62 | 63 | } 64 | 65 | } 66 | 67 | -------------------------------------------------------------------------------- /js/codemirror/addon/comment/continuecomment.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var modes = ["clike", "css", "javascript"]; 3 | for (var i = 0; i < modes.length; ++i) 4 | CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "}); 5 | 6 | function continueComment(cm) { 7 | var pos = cm.getCursor(), token = cm.getTokenAt(pos); 8 | if (token.type != "comment") return CodeMirror.Pass; 9 | var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode; 10 | 11 | var insert; 12 | if (mode.blockCommentStart && mode.blockCommentContinue) { 13 | var end = token.string.indexOf(mode.blockCommentEnd); 14 | var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found; 15 | if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) { 16 | // Comment ended, don't continue it 17 | } else if (token.string.indexOf(mode.blockCommentStart) == 0) { 18 | insert = full.slice(0, token.start); 19 | if (!/^\s*$/.test(insert)) { 20 | insert = ""; 21 | for (var i = 0; i < token.start; ++i) insert += " "; 22 | } 23 | } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 && 24 | found + mode.blockCommentContinue.length > token.start && 25 | /^\s*$/.test(full.slice(0, found))) { 26 | insert = full.slice(0, found); 27 | } 28 | if (insert != null) insert += mode.blockCommentContinue; 29 | } 30 | if (insert == null && mode.lineComment) { 31 | var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment); 32 | if (found > -1) { 33 | insert = line.slice(0, found); 34 | if (/\S/.test(insert)) insert = null; 35 | else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\s*/)[0]; 36 | } 37 | } 38 | 39 | if (insert != null) 40 | cm.replaceSelection("\n" + insert, "end"); 41 | else 42 | return CodeMirror.Pass; 43 | } 44 | 45 | CodeMirror.defineOption("continueComments", null, function(cm, val, prev) { 46 | if (prev && prev != CodeMirror.Init) 47 | cm.removeKeyMap("continueComment"); 48 | if (val) { 49 | var map = {name: "continueComment"}; 50 | map[typeof val == "string" ? val : "Enter"] = continueComment; 51 | cm.addKeyMap(map); 52 | } 53 | }); 54 | })(); 55 | -------------------------------------------------------------------------------- /export/xls/export.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | function export_report($report){ 26 | global $DB, $CFG; 27 | require_once($CFG->dirroot.'/lib/excellib.class.php'); 28 | 29 | $table = $report->table; 30 | $matrix = array(); 31 | $filename = 'report_'.(time()).'.xls'; 32 | 33 | if (!empty($table->head)) { 34 | $countcols = count($table->head); 35 | $keys=array_keys($table->head); 36 | $lastkey = end($keys); 37 | foreach ($table->head as $key => $heading) { 38 | $matrix[0][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($heading)))); 39 | } 40 | } 41 | 42 | if (!empty($table->data)) { 43 | foreach ($table->data as $rkey => $row) { 44 | foreach ($row as $key => $item) { 45 | $matrix[$rkey + 1][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($item)))); 46 | } 47 | } 48 | } 49 | 50 | $downloadfilename = clean_filename($filename); 51 | /// Creating a workbook 52 | $workbook = new MoodleExcelWorkbook("-"); 53 | /// Sending HTTP headers 54 | $workbook->send($downloadfilename); 55 | /// Adding the worksheet 56 | $myxls = $workbook->add_worksheet($filename); 57 | 58 | foreach($matrix as $ri=>$col){ 59 | foreach($col as $ci=>$cv){ 60 | $myxls->write_string($ri,$ci,$cv); 61 | } 62 | } 63 | 64 | $workbook->close(); 65 | exit; 66 | 67 | 68 | } 69 | 70 | -------------------------------------------------------------------------------- /export/ods/export.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** Configurable Reports 19 | * A Moodle block for creating customizable reports 20 | * @package blocks 21 | * @author: Juan leyva 22 | * @date: 2009 23 | */ 24 | 25 | function export_report($report){ 26 | global $DB, $CFG; 27 | require_once($CFG->dirroot.'/lib/odslib.class.php'); 28 | 29 | $table = $report->table; 30 | $matrix = array(); 31 | $filename = 'report_'.(time()).'.ods'; 32 | 33 | if (!empty($table->head)) { 34 | $countcols = count($table->head); 35 | $keys=array_keys($table->head); 36 | $lastkey = end($keys); 37 | foreach ($table->head as $key => $heading) { 38 | $matrix[0][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($heading)))); 39 | } 40 | } 41 | 42 | if (!empty($table->data)) { 43 | foreach ($table->data as $rkey => $row) { 44 | foreach ($row as $key => $item) { 45 | $matrix[$rkey + 1][$key] = str_replace("\n",' ',htmlspecialchars_decode(strip_tags(nl2br($item)))); 46 | } 47 | } 48 | } 49 | 50 | $downloadfilename = clean_filename($filename); 51 | /// Creating a workbook 52 | $workbook = new MoodleODSWorkbook("-"); 53 | /// Sending HTTP headers 54 | $workbook->send($downloadfilename); 55 | /// Adding the worksheet 56 | $myxls =& $workbook->add_worksheet($filename); 57 | 58 | foreach($matrix as $ri=>$col){ 59 | foreach($col as $ci=>$cv){ 60 | $myxls->write_string($ri,$ci,$cv); 61 | } 62 | } 63 | 64 | $workbook->close(); 65 | exit; 66 | 67 | 68 | } 69 | 70 | --------------------------------------------------------------------------------