Skip to content

Commit

Permalink
Bug #2, Integrate moodlerooms/moodle-plugin-ci - Travis-CI [iet:850…
Browse files Browse the repository at this point in the history
…3203]
  • Loading branch information
nfreear committed Mar 29, 2017
1 parent 07362c0 commit 0225133
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#/bin

thirdpartylibs.xml
phpcs.xml
/*.xml

Expand All @@ -15,5 +16,7 @@ vendor

node_modules
.eslintrc*
.jshintrc*
.env

#End.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ install:
- composer install
- composer npm-install
- composer eslint-config
- composer jshint-config
- composer ci-ignore
- composer less

script:
- composer test
- composer validate
- composer ci-test

#End.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Available via IET-OU Satis:
To facilitate pilot studies using Moodle (e.g. for TeSLA) by:

1. Enabling OpenID login using just a username, not a full URL (e.g. https://openid.example.org/{username})
2. Simple login page with custom instructions (hard-coded at present), `/index.php`,
2. Simple login page with custom instructions (edit via Moodle language customisations), `/index.php`,
3. Importing pilot-related data into a separate DB table, `mdl_auth_ouopenid_users`,
4. Making the pilot-related data available via `/user/ajax.php`,
5. Tries to redirect the participant to a bespoke URL (a work-in-progress),
Expand Down
22 changes: 21 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,35 @@
"composer/installers": "^1.2"
},
"require-dev": {
"moodlerooms/moodle-plugin-ci": "^1.5",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"squizlabs/php_codesniffer": "2.8.1"
},
"scripts": {
"ci-ignore": [
"echo '<?xml version=\"1.0\"?>\n<libraries>' > thirdpartylibs.xml",
"echo '\t<library><location>db/User.php</location></library>' >> thirdpartylibs.xml",
"echo '\t<library><location>vendor/</location></library>' >> thirdpartylibs.xml",
"echo '\t<library><location>node_modules/</location></library>' >> thirdpartylibs.xml",
"echo '</libraries>' >> thirdpartylibs.xml"
],
"ci-install": "vendor/bin/moodle-plugin-ci install",
"ci-test": [
"vendor/bin/moodle-plugin-ci phplint .",
"vendor/bin/moodle-plugin-ci phpcpd .",
"# vendor/bin/moodle-plugin-ci phpmd .",
"# vendor/bin/moodle-plugin-ci codechecker .",
"vendor/bin/moodle-plugin-ci csslint .",
"vendor/bin/moodle-plugin-ci shifter .",
"vendor/bin/moodle-plugin-ci jshint .",
"# N/A? vendor/bin/moodle-plugin-ci validate .",
"# vendor/bin/moodle-plugin-ci phpunit . --coverage-text"
],
"sym-links": [
"cd ../moodle-auth-openid && ln -s ../moodle-auth-ouopenid/event.php"
],
"npm-install": "npm install eslint less",
"jshint-config": "echo '{ \"laxcomma\": true }' > .jshintrc",
"eslint-config": [
"echo '---\n extends: eslint:recommended\n globals:\n window: false\n root: true\n' > .eslintrc.yaml",
"echo '{\n \"extends\": \"eslint:recommended\",\n \"globals\": { \"window\": false }\n}' > .eslintrc-XX.json"
Expand All @@ -41,7 +62,6 @@
"vendor/bin/phpcs --standard=PSR2 -n db/*.php",
"composer cn",
"composer eslint",
"composer less",
"php -r 'simplexml_load_file(\"db/install.xml\");' && echo install.xml OK!"
],
"mcs": "vendor/bin/phpcs --standard=./moodle-core.xml --ignore=vendor --ignore=.git --extensions=php .",
Expand Down
5 changes: 3 additions & 2 deletions style/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ abbr {
border-bottom: 1px dotted #aaa;
cursor: help;
}
h1, h2 {
h1, h2, label, button {
color: #444;
font-weight: bold;
}
body > div {
background-color: #fff;
Expand Down Expand Up @@ -46,7 +47,7 @@ input:focus, button:focus,
input:hover, button:hover {
border-color: #999;
}
.XX[ name = openid_url ] {
input.XX[ name = openid_url ] {
color: #666;
display: none;
}
35 changes: 18 additions & 17 deletions style/ouop-styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {
background-color: #f9f9f9;
}

[ data-region = drawer ] {
div[ data-region = drawer ] {
background-color: transparent;
}

Expand Down Expand Up @@ -38,7 +38,8 @@ body {

#page-local-tesla-views-agreement {

iframe[ src *= 'docs.google.com' ] {
iframe.ouop-consent-doc {
//Was: iframe[ src *= 'docs.google.com' ] {
display: block;
border: 1px solid #ddd;
width: 100%;
Expand All @@ -53,17 +54,17 @@ body {
.ouop-hide-unused-ui {

// Course main page.
[ data-key = badgesview ],
[ data-key = participants ],
[ href *= coursecompetencies ],
[ data-key = grade ],
[ data-key = calendar ],
[ href *= 'user/files' ] {
a[ data-key = badgesview ],
a[ data-key = participants ],
a[ href *= coursecompetencies ],
a[ data-key = grade ],
a[ data-key = calendar ],
a[ href *= 'user/files' ] { // csslint: Attribute selectors with *= are slow!
display: none;
}

[ data-title = 'grades,grades' ],
[ data-title = 'messages,message' ] {
a[ data-title = 'grades,grades' ],
a[ data-title = 'messages,message' ] {
display: none;
}

Expand All @@ -75,22 +76,22 @@ body {

// User/edit page.
&#page-user-edit {
[ data-fieldtype = select ],
[ data-fieldtype = editor ],
div[ data-fieldtype = select ],
div[ data-fieldtype = editor ],

#id_moodle_picture,
#id_moodle_additional_names,
#id_moodle_optional,
#id_category_2,
a.collapse-all,
.btn-link[ data-toggle ] {
a.btn-link[ data-toggle ] {
display: none;
}

[ for = id_maildisplay ],
[ for = id_country ],
[ for = id_timezone ],
[ for = id_description_editor ] {
label[ for = id_maildisplay ],
label[ for = id_country ],
label[ for = id_timezone ],
label[ for = id_description_editor ] {
display: none !important;
}
}
Expand Down
4 changes: 2 additions & 2 deletions user/ouop-local-fixes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

C.debug('ouop: complete-user-profile-form');
}
};


OUOP.local_fixes = function ($) {
Expand Down Expand Up @@ -69,7 +69,7 @@
OUOP.rand = function () {
var min = 11, max = 9999;
return Math.floor(Math.random() * (max - min)) + min;
}
};


}(window));

0 comments on commit 0225133

Please sign in to comment.