Compare commits

...

197 Commits

Author SHA1 Message Date
Dan Poltawski a0352aa95e Moodle release 3.2rc4 2016-11-29 13:33:15 +00:00
Dan Poltawski d5d1d56f9c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2016-11-29 13:33:13 +00:00
David Mudrák 1270616023 MDL-56800 theme_boost: Radios should not have name if soft frozen, too 2016-11-29 11:32:28 +00:00
Andrew Nicols 06ded0ed5f MDL-56800 theme_boost: Remove name from hardFrozen radio 2016-11-29 08:11:31 +00:00
Andrew Nicols 220f3ac711 MDL-56858 theme_boost: Correct bad merge conflict 2016-11-29 13:49:18 +08:00
David Monllao 1e102ca3ca Merge branch 'wip-mdl-57168-m1' of git://github.com/rajeshtaneja/moodle 2016-11-29 13:41:55 +08:00
David Monllao 7621fe8399 Merge branch 'MDL-57158-int-fix-1' of github.com:ryanwyllie/moodle 2016-11-29 13:36:52 +08:00
Damyon Wiese 0d5f5f7357 MDL-57124 boost: I want really tiny logos.
Said no-one ever.

Use max-height so very small logos will not be scaled up.
2016-11-29 13:21:35 +08:00
Andrew Nicols 805659e1fa Merge branch 'MDL-56919-master' of git://github.com/junpataleta/moodle 2016-11-29 12:06:56 +08:00
Jun Pataleta 01dc1c11ec MDL-56919 mod_forum: Assign check icon for selected subscription mode 2016-11-29 12:03:34 +08:00
Andrew Nicols 740dbe77a2 Merge branch 'MDL-56858_master-alt-2' of git://github.com/markn86/moodle 2016-11-29 11:52:32 +08:00
David Monllao 8b516a6a55 Merge branch 'MDL-57163_master' of git://github.com/dmonllao/moodle 2016-11-29 11:46:55 +08:00
David Monllao 4a1165ba39 MDL-57163 install: Check curl availability before curl_version() 2016-11-29 11:46:06 +08:00
Rajesh Taneja 9eb8f6ec56 MDL-57168 behat: Don't press continue as it will go to Annotate PDF
This might cause random failures as the draft files are being accessed by other user
2016-11-29 10:53:02 +08:00
David Monllao dc3e3c0831 Merge branch 'MDL-57097-master' of git://github.com/lameze/moodle 2016-11-29 10:51:10 +08:00
Damyon Wiese 4d41cec8db MDL-57124 boost: Show pageheaderbutton when no navbar
Even if there is no navbar - if there is a pageheaderbutton we need to
show it (E.g. Customise this page on dashboard).
2016-11-29 10:07:16 +08:00
Ryan Wyllie 12f7202177 MDL-57158 theme: add margin for icon in pull right menu 2016-11-29 00:34:44 +00:00
Rajesh Taneja 8392a86068 MDL-57168 behat: Check for button not text 2016-11-29 07:36:43 +08:00
Mark Nelson dc801cb6b9 MDL-56858 theme_boost: separate input description and label
Also added missing advanced and required form symbols.
2016-11-28 18:24:16 +08:00
Dan Poltawski 1cbc346092 Merge branch 'MDL-57176-master' of git://github.com/damyon/moodle 2016-11-28 08:30:37 +00:00
David Monllao c56c23720b Merge branch 'MDL-57124-master' of git://github.com/damyon/moodle 2016-11-28 15:22:46 +08:00
Damyon Wiese 7ad1d2da47 MDL-57124 Boost: Login page styles (and signup)
Center logo / site name.
Add padding to logo / site name.
Serve retina images and resize with css.
Add a line under the logo / site name.
Don't show site name if there is a logo.
Obey nonavbar option in core_renderer.
2016-11-28 15:20:35 +08:00
Damyon Wiese 58ec5a315b MDL-57176 blocks: Never never never dup blocks
Dont create duplicate blocks 'requiredbytheme' for any reason.
2016-11-28 14:48:02 +08:00
David Monllao 6ee691d71b Merge branch 'MDL-57158-master' of git://github.com/ryanwyllie/moodle 2016-11-28 14:39:22 +08:00
Ryan Wyllie 60ff24c0f1 MDL-57158 theme: fix icon margin in action menus 2016-11-28 06:37:08 +00:00
David Monllao c811356efb Merge branch 'MDL-57156-master' of https://github.com/snake/moodle 2016-11-28 14:00:50 +08:00
Vladimir Zhirov acefc7d963 MDL-57163 installation: fixed "Call to undefined function curl_version" 2016-11-28 13:25:41 +08:00
David Monllao f59bab60c0 Merge branch 'wip-mdl-57168' of https://github.com/rajeshtaneja/moodle 2016-11-28 12:59:11 +08:00
Rajesh Taneja 47b03b9170 MDL-57168 behat: Fixed xpath to ensure active link is checked 2016-11-28 12:57:56 +08:00
Rajesh Taneja d442a3169c MDL-57168 behat: Return link is the existing category 2016-11-28 12:57:56 +08:00
Rajesh Taneja 3df6e801b5 MDL-57168 behat: Ensure drawer is open before clicking the link 2016-11-28 12:57:55 +08:00
David Monllao 920778eb93 Merge branch 'MDL-56619-master' of git://github.com/ryanwyllie/moodle 2016-11-28 12:45:46 +08:00
David Monllao d826c64c57 Merge branch 'wip-mdl-57147' of https://github.com/rajeshtaneja/moodle 2016-11-28 12:40:27 +08:00
David Monllao 085e077fa3 Merge branch 'MDL-57146-master' of git://github.com/damyon/moodle 2016-11-28 12:15:30 +08:00
Ryan Wyllie 341da3e3fb MDL-56619 theme: filemanager_selectlayout bootstrap 4 form styling 2016-11-28 03:42:40 +00:00
Jake Dallimore 0395ec28e2 MDL-57156 themes: override caption alignment in theme boost 2016-11-28 11:35:11 +08:00
David Monllao dd106016ee Merge branch 'MDL-57122-master' of git://github.com/ankitagarwal/moodle 2016-11-28 11:31:05 +08:00
Ankit Agarwal 2adf5ef946 MDL-57122 boost: Don't escape strings twice
Strings should always be escaped in templates not before
2016-11-28 08:22:41 +05:30
Ankit Agarwal 6c4aba1e7e MDL-57122 boost: Add context docs to login template 2016-11-28 08:22:41 +05:30
Jun Pataleta 894b1825f6 MDL-56919 boost: Render non-action menu items as disabled action links 2016-11-28 10:20:18 +08:00
Jun Pataleta 27a3843d05 MDL-56919 templates: action_link template fixes when disabled
For the case where the action_link template is shown as disabled:
* Allow extra classes to be set on on the class attribute.
* Allow extra attributes to be set.
2016-11-28 10:20:18 +08:00
Rajesh Taneja 96813571b1 MDL-57147 phpunit: Check if time is greater than or equal to
Some windows only have 1/100 microtime resolution
so a lot of times it does not advance enough.
2016-11-28 09:40:21 +08:00
AMOS bot c1722505e1 Automatically generated installer lang files 2016-11-27 00:05:45 +08:00
Dan Poltawski 39f621305d Merge branch 'MDL-57134-master' of git://github.com/lameze/moodle 2016-11-25 12:35:17 +00:00
Dan Poltawski 1f5fbd1696 Merge branch 'wip-mdl-56659' of https://github.com/rajeshtaneja/moodle 2016-11-25 11:17:36 +00:00
Dan Poltawski cdef9e91a3 Merge branch 'MDL-56800-master-radio' of git://github.com/mudrd8mz/moodle 2016-11-25 10:44:19 +00:00
David Monllao 3eabedbb92 Moodle release 3.2rc3 2016-11-25 15:58:02 +08:00
David Monllao 9441af9596 NOBUG: Fixed file access permissions 2016-11-25 15:58:02 +08:00
David Monllao c08a263134 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2016-11-25 15:58:01 +08:00
Marina Glancy 392367c4f7 MDL-56586 behat: fix behat tests to work with new add block 2016-11-25 14:04:10 +08:00
Rajesh Taneja 350d0ae6b7 MDL-56659 core: Enable password field when label is clicked 2016-11-25 12:09:37 +08:00
Rajesh Taneja dfa707c994 MDL-56659 core: No need for noscript tag and set size later
1. BrowserKitDriver::setValue only checks if the element is
   disabled. It still is able to set value on hidden elements
   So there is no need for noscript tag in password unmask
2. Set size on hidden field is not valid html, so set it later
   when text element is displayed
2016-11-25 12:09:37 +08:00
David Monllao 0d9d55a3ad Merge branch 'MDL-56584-master-fix1' of http://github.com/damyon/moodle 2016-11-25 11:15:32 +08:00
David Monllao b4f82837ba Merge branch 'MDL-55324-master-fix' of git://github.com/cameron1729/moodle 2016-11-25 11:11:20 +08:00
David Monllao bae517c616 Merge branch 'MDL-57094-int-patch-1' of github.com:ryanwyllie/moodle 2016-11-25 10:52:00 +08:00
David Monllao b68af8e6f8 Merge branch 'MDL-56801-master' of git://github.com/lameze/moodle 2016-11-25 10:40:39 +08:00
Ryan Wyllie af46d1dd23 MDL-57094 admin_tool: fix subscription behat tests 2016-11-25 02:24:33 +00:00
David Monllao b35c209d76 MDL-56551 calendar: Update behat test according to DOM changes 2016-11-25 10:06:36 +08:00
Damyon Wiese a1e8265d48 MDL-57146 boost: New tabbed settings page missing branch links
Branches that are also links were not showing as links.
2016-11-25 10:00:22 +08:00
David Monllao b71149c9ac Merge branch 'MDL-56761-master' of git://github.com/ryanwyllie/moodle 2016-11-25 09:36:17 +08:00
Damyon Wiese 262253f624 MDL-56584 boost: Use tabindex-1 on nav drawer
Also use aria-hidden on unicode symbol for hamburger.
2016-11-25 09:27:17 +08:00
David Monllao c15f993cde Merge branch 'wip-mdl-56898-fix4' of https://github.com/rajeshtaneja/moodle 2016-11-25 09:24:24 +08:00
Rajesh Taneja d2a44a71ac MDL-56898 behat: Focus only works with JS 2016-11-25 09:20:52 +08:00
David Monllao 92fa8b8fde Merge branch 'MDL-57126-master' of https://github.com/snake/moodle 2016-11-25 09:18:26 +08:00
David Monllao 29c96d214b Merge branch 'MDL-55857-master' of git://github.com/danpoltawski/moodle 2016-11-25 08:46:04 +08:00
Marina Glancy 1adf21fc1d MDL-57019 behat: corrections to the selectors, adding waiting 2016-11-25 08:38:24 +08:00
Jake Dallimore d714aeb4f5 MDL-57126 core: add 'scss' to list of core filetypes.
This allows filetype restrictions to work when uploading additional
preset files on the Boost admin settings page.
2016-11-25 07:53:59 +08:00
David Mudrák c03f1de198 MDL-56800 theme_boost: Clean up rendering of the radio buttons
The <input type="radio"> element does not support the size attribute so
there is no point of rendering it. Also fixed the example data as the
field name must not contain any whitespace.
2016-11-24 23:50:21 +01:00
David Mudrák edd837038a MDL-56800 theme_boost: Display frozen form's radios as disabled
For frozen (read-only) forms, the radio widget was not displayed at all
and only the legend text was displayed. So it was not possible to see
which one of the radios in a group was selected.

This patch mimics the original quick form rendering and displays the
radio as disabled.
2016-11-24 23:47:39 +01:00
Dan Poltawski ad76556b76 Merge branch 'MDL-56948-master' of https://github.com/lucisgit/moodle 2016-11-24 15:58:05 +00:00
Dan Poltawski 9cc9690575 Merge branch 'MDL-57102-master' of git://github.com/jleyva/moodle 2016-11-24 10:43:21 +00:00
Dan Poltawski b001cd4b17 Merge branch 'MDL-56431-filter-fix' of git://github.com/abgreeve/moodle 2016-11-24 09:45:53 +00:00
Dan Poltawski 74b8557661 Merge branch 'MDL-57013_master' of https://github.com/nadavkav/moodle 2016-11-24 09:44:32 +00:00
Adrian Greeve 72a5842bd7 MDL-56431 messaging: Added aria label to filter.
Added an aria label to the course filter in the
messaging page.
2016-11-24 17:33:22 +08:00
Dan Poltawski 304e8a8d0c Merge branch 'wip-MDL-56586-master-2' of git://github.com/marinaglancy/moodle 2016-11-24 09:30:29 +00:00
Dan Poltawski c5c8f3a6f5 Merge branch 'MDL-57118-master' of git://github.com/damyon/moodle 2016-11-24 09:26:52 +00:00
Marina Glancy 86ac6a3763 MDL-57019 behat: make tab navigation compatible with boost 2016-11-24 16:47:00 +08:00
Simey Lameze 539de849cd MDL-57134 core_badges: add missing badgeslib.php include 2016-11-24 16:45:17 +08:00
David Monllao 68dde67d9f Merge branch 'MDL-57094-master' of git://github.com/ryanwyllie/moodle 2016-11-24 15:53:26 +08:00
David Monllao 8b81daf4dd Merge branch 'MDL-56429-master' of git://github.com/ryanwyllie/moodle 2016-11-24 15:47:31 +08:00
David Monllao 4de871f4ca Merge branch 'MDL-57001-master' of git://github.com/damyon/moodle 2016-11-24 15:29:04 +08:00
Damyon Wiese a955cf531c MDL-57118 boost: Participants cog shows too much
Because 0 == 'participants' in php.
2016-11-24 15:27:17 +08:00
Andrew Nicols 9a102866be Merge branch 'MDL-56564-master-2' of git://github.com/junpataleta/moodle 2016-11-24 15:22:12 +08:00
David Monllao 8411e0a508 Merge branch 'wip-mdl-56797' of https://github.com/rajeshtaneja/moodle 2016-11-24 15:19:18 +08:00
Ryan Wyllie 1fb687ea8f MDL-56761 theme: fix RTL styling for hover tooltip 2016-11-24 07:12:46 +00:00
Damyon Wiese 2fedc0da7c MDL-57001 roles: Do access check for switchroles
Put it in the API so it can't be skipped.
2016-11-24 15:11:19 +08:00
Damyon Wiese 7dba450fd4 MDL-57001 user_menu: Hide switch roles students
Check that there are switchable roles before showing the link in the user menu.
2016-11-24 15:11:19 +08:00
Damyon Wiese 22b8c5b842 MDL-57001 user_menu: Fixes for unit tests
We added a link to the user menu so we have to adjust the tests.
2016-11-24 15:11:19 +08:00
Damyon Wiese 8c224317ee MDL-57001 switchroles: Add a cancel link to the page. 2016-11-24 15:11:19 +08:00
Damyon Wiese 70b03eff02 MDL-57001 switchroles: Move to user menu
Take this out of the navigation and force it in the user menu.
2016-11-24 15:11:19 +08:00
Damyon Wiese 7095f5be97 MDL-57001 usermenu: Add switch role to the bottom of the user menu 2016-11-24 15:11:19 +08:00
Andrew Nicols 4213f7e236 Merge branch 'wip-MDL-57019-fix' of https://github.com/marinaglancy/moodle 2016-11-24 15:09:43 +08:00
Simey Lameze 45d5594ecb MDL-56801 theme_boost: remove registration_textfield rule
The registration_textfield conflicts with the form default styling and breaks form layout.
2016-11-24 14:40:38 +08:00
Marina Glancy bf07b81543 MDL-56586 blocks: use template for non-JS add block selector 2016-11-24 14:24:59 +08:00
Damyon Wiese be2247fb24 MDL-56586 blocks: Do the addblock in a modal 2016-11-24 14:24:59 +08:00
Marina Glancy b1e5624ad9 MDL-56586 blocks: Fix mess with links to permissions
problem 1: links to blocks permissions changes were missing in boost
problem 2: when modifying link from dashboard user is returned to profile ('returnurl' passed but not respected)
problem 3: link to check permissions missing from category management page
fix: instead of respecting both 'return' and 'returnurl' parameter use only 'returnurl'
fix: use 'popup' layout when modifying permissions for a block
2016-11-24 14:24:59 +08:00
Marina Glancy b11916d3e7 MDL-56586 blocks: allow theme to manage "Add a block" select 2016-11-24 14:24:56 +08:00
Ryan Wyllie de4ca62e7a MDL-56429 theme: add margin to processor settings form controls
Add a top margin to the form controls in the processor settings modal on
the notification preferences page to separate the content from the
controls.
2016-11-24 06:12:27 +00:00
Marina Glancy b0842f61f4 MDL-57019 behat: new step to navigate to gradebook section 2016-11-24 12:46:27 +08:00
Cameron Ball 4d85886b5f MDL-55324 atto_media: Reduce maximum height of atto modal
Previously after adding a few sources or expanding a few fieldsets
the modal would be pushed off the bottom of the screen. Here we
reduce the maximum height to allow it to remain visible.
2016-11-24 12:31:30 +08:00
David Monllao 692c1bf345 Merge branch 'MDL-56391_master-fix' of https://github.com/markn86/moodle 2016-11-24 11:28:00 +08:00
Mark Nelson bb3a1d6f39 MDL-56391 core_user: fixed failing behat 2016-11-24 11:24:32 +08:00
Simey Lameze b6f549d139 MDL-57097 mod_assign: add event listener to avoid form submit 2016-11-24 11:24:25 +08:00
Jun Pataleta 144c149704 MDL-56564 mod_lti: Reset fields before updating tool matches 2016-11-24 11:09:03 +08:00
Andrew Nicols 2ecb3ffa97 Merge branch 'wip-mdl-56898-fix3' of https://github.com/rajeshtaneja/moodle 2016-11-24 11:08:55 +08:00
David Monllao fa42b7bc69 Merge branch 'MDL-57069_master' of git://github.com/markn86/moodle 2016-11-24 11:04:28 +08:00
Cameron Ball e24699cc7a MDL-55324 atto_media: Preserve help text when adding sources 2016-11-24 10:55:05 +08:00
David Monllao ff8b71ef7b Merge branch 'MDL-56871_master' of git://github.com/markn86/moodle 2016-11-24 09:53:45 +08:00
David Monllao 55f8edfdf2 Merge branch 'MDL-56993-master' of git://github.com/damyon/moodle 2016-11-24 09:50:31 +08:00
David Monllao 654efef456 Merge branch 'MDL-56551-master' of git://github.com/damyon/moodle 2016-11-24 09:47:18 +08:00
Andrew Nicols 65f0ef9e34 Merge branch 'wip-mdl-57112' of https://github.com/rajeshtaneja/moodle 2016-11-24 08:43:45 +08:00
Rajesh Taneja febbb9f8cd MDL-57112 behat: Social activity block is by default present 2016-11-24 07:45:55 +08:00
Rajesh Taneja 8c35e49b37 MDL-56898 behat: No need to trigger error, as it sometimes hangs behat 2016-11-24 07:31:38 +08:00
Rajesh Taneja b3502be320 MDL-56898 behat: Ensure we have button in viewport and page is stable 2016-11-24 07:27:19 +08:00
Juan Leyva 851b291998 MDL-57102 tool_mobile: Return launchurl when sign-up enabled 2016-11-23 19:35:08 +00:00
Juan Leyva 813320fbb6 MDL-57102 auth: Add new signup_is_enabled function
And apply the function in:
- login/signup.php
- blocks/login/block_login.php
2016-11-23 19:35:08 +00:00
Damyon Wiese 9d44510d60 MDL-57100 JS: Exceptions give exceptions
Exceptions returned from ajax are not in the format expected by the JS, so
an error occurs and the exception popups are not appearing.
2016-11-23 18:07:26 +00:00
Dan Poltawski 4b287476f3 Merge branch 'MDL-53964' of https://github.com/timhunt/moodle 2016-11-23 16:07:28 +00:00
AMOS bot c61d7c0802 Merge branch 'master' into install_master 2016-11-24 00:06:13 +08:00
Dan Poltawski 183b1d6785 MDL-56995 boost: fix css lint warning 2016-11-23 15:47:12 +00:00
Dan Poltawski 2a55269ce8 Merge branch 'MDL-56584-master' of git://github.com/damyon/moodle 2016-11-23 15:44:29 +00:00
Dan Poltawski 2ec4ed4dba Merge branch 'MDL-56995-master' of git://github.com/damyon/moodle 2016-11-23 15:07:26 +00:00
Damyon Wiese 242997744d MDL-56995 boost: Hide navigation for print media
Hide the navigation elements, flat navigation settings menus etc when
printing.
2016-11-23 22:32:20 +08:00
Dan Poltawski 203f51d627 MDL-57064 tests: update externallib test 2016-11-23 13:00:29 +00:00
Dan Poltawski 9f82774a8b Merge branch 'MDL-57064-master' of git://github.com/FMCorz/moodle 2016-11-23 12:46:18 +00:00
Dan Poltawski c8012422eb Merge branch 'MDL-35949' of https://github.com/timhunt/moodle 2016-11-23 12:31:22 +00:00
Dan Poltawski 68153d5cbc Merge branch 'MDL-56564-master-2' of git://github.com/junpataleta/moodle 2016-11-23 11:27:20 +00:00
Dan Poltawski be58f604b5 Merge branch 'MDL-57112-master' of git://github.com/cameron1729/moodle 2016-11-23 10:34:33 +00:00
Dan Poltawski 93b68886e9 Merge branch 'MDL-57093-master' of git://github.com/ryanwyllie/moodle 2016-11-23 10:32:01 +00:00
Dan Poltawski fd111ccabf MDL-57061 boost: build js 2016-11-23 10:23:02 +00:00
Dan Poltawski 2664ef1861 Merge branch 'MDL-57061-master' of git://github.com/FMCorz/moodle 2016-11-23 10:18:48 +00:00
Adrian Greeve 58c2684db2 MDL-56431 messaging: Set focus to the write a message box. 2016-11-23 09:13:51 +00:00
Adrian Greeve d14207fd25 MDL-56431 messaging: Adding access to messaging.
This adds the most crucial elements needed for making
the messaging page accessible. There are still some other
areas that need addressing.
2016-11-23 09:13:50 +00:00
Damyon Wiese c0f89860ec MDL-56993 boost: Add behat tests for boost nav menus 2016-11-23 16:47:25 +08:00
Mark Nelson cb8057531f MDL-56871 core_message: fix inconsistent online status between panels 2016-11-23 16:32:46 +08:00
Dan Poltawski 19d8b0f9e1 Merge branch 'MDL-56182-master' of git://github.com/FMCorz/moodle 2016-11-23 08:26:38 +00:00
Cameron Ball 1b367ac6e8 MDL-57112 blocks: Add back social_activities block for social courses.
Courses in the social format are difficult to use. This patch
simply adds back the social activities block to the social
course format.
2016-11-23 16:06:37 +08:00
Andrew Nicols a954685767 Merge branch 'MDL-56988-master' of git://github.com/lameze/moodle 2016-11-23 15:53:49 +08:00
Andrew Nicols 020fb9d2dc Merge branch 'MDL-56733-master' of git://github.com/ankitagarwal/moodle 2016-11-23 15:50:38 +08:00
Ankit Agarwal 2c0dfa7d33 MDL-56733 boost: Add a preset repo link 2016-11-23 13:14:48 +05:30
Damyon Wiese ea5084f7f1 MDL-56993 boost: Fix navigation for singleactivity format
The single activity course format has no course front page, so we need
to make a special case for it so it's possible to get to the course
admin menu and put the course nodes in the flat navigation.
2016-11-23 15:31:27 +08:00
Simey Lameze 270b2e443c MDL-56988 report: review and apply boosty styles to all reports 2016-11-23 15:30:32 +08:00
Mark Nelson afa68a8174 MDL-57069 core_message: prevent past messages being loaded 2016-11-23 14:26:14 +08:00
Andrew Nicols 2a58fef860 Merge branch 'MDL-57059-master' of git://github.com/lameze/moodle 2016-11-23 14:15:42 +08:00
David Monllao d062d64fb8 Merge branch 'MDL-56116-master' of git://github.com/FMCorz/moodle 2016-11-23 14:01:48 +08:00
Frederic Massart 862816eec3 MDL-56116 theme_boost: Improve developer documentation related to themes 2016-11-23 13:55:28 +08:00
Ryan Wyllie b487a7c028 MDL-57094 message: change view more link in notification popover 2016-11-23 05:54:07 +00:00
Simey Lameze bea19e0dec MDL-57059 theme_boost: add rule to fix slot number misalignment 2016-11-23 13:37:55 +08:00
Jun Pataleta 1b669ebeba MDL-56564 mod_lti: External tool form fixes
* Revert disabling of the Preconfigured tool field on edit mode
* Reset LTI tool configuration fields when selecting a different
  preconfigured tool.
* Behat fixes for UI changes.
2016-11-23 13:10:51 +08:00
Frederic Massart e0c5ffb681 MDL-57061 theme_boost: Focus the invalid form elements on error 2016-11-23 12:11:57 +08:00
Andrew Nicols 5bda9fe900 Merge branch 'MDL-55324-master' of git://github.com/cameron1729/moodle 2016-11-23 12:09:46 +08:00
Cameron Ball 28e93cc41b MDL-55324 atto_media: Implement HTML compliant media plugin
This patch completely reworks the atto media plugin to allow
insertion of HTML media elements.
2016-11-23 11:57:33 +08:00
Cameron Ball a60a98d900 MDL-55324 filepicker: Explicitly set callback from showFilePicker
Prior to this patch the callback passed to showFilePicker was saved
and reused for subsequent calls. This doesn't allow the use of a function
for generating the callback.

This patch explicitly sets the callback each time.
2016-11-23 11:56:40 +08:00
Andrew Nicols 44cf94a877 Merge branch 'wip-MDL-57019-master' of git://github.com/marinaglancy/moodle 2016-11-23 11:54:16 +08:00
David Monllao d5c2829b06 MDL-56902 version: Triggering a major upgrade 2016-11-23 11:50:26 +08:00
David Monllao b3440a13cc Merge branch 'MDL-56902-master-fix1' of http://github.com/damyon/moodle 2016-11-23 11:48:44 +08:00
Ryan Wyllie 52aeda247c MDL-57093 forum: less specific unread styling
Changed the CSS for unread styling to no longer use ids because the
rules are too specific and override other elements with the .unread
class on the forum pages.
2016-11-23 03:40:30 +00:00
Damyon Wiese 48489fb93a MDL-56551 calendar: cibot fixes from this issue 2016-11-23 11:25:57 +08:00
Damyon Wiese 7ee4a28719 MDL-56551 calendar: Events list fixes for boost
The events list is now a list of cards with headers.
Spacing and layout is now done with bootstrap utility classes.
The existing classes were kept - and the styles for bootstrapbase are not changed much.
Also calendar colours can be overridden from a preset.
2016-11-23 11:25:52 +08:00
Damyon Wiese 1ac36fa9f7 MDL-56902 blocks: No theme blocks if fake blocks only
When showing only fake blocks, never auto create the blocks for the
theme. This would give you double blocks.
2016-11-23 11:07:32 +08:00
Frederic Massart 6b7e523b5d MDL-56182 mod_lti: Include the query string when comparing type URLs 2016-11-23 10:16:50 +08:00
David Monllao 8fb1b3bb68 Merge branch 'MDL-56391_master' of git://github.com/markn86/moodle 2016-11-23 09:49:03 +08:00
Dan Poltawski 3fd840072f MDL-56988 report: attempt to improve styling of reports 2016-11-23 08:50:06 +08:00
David Monllao 44c3d0775c Merge branch 'MDL-56902-master' of git://github.com/damyon/moodle 2016-11-23 08:29:41 +08:00
David Monllao 111d6b8f24 Merge branch 'MDL-57089-master' of git://github.com/ankitagarwal/moodle 2016-11-23 08:20:13 +08:00
David Monllao 74138c7cd0 Merge branch 'MDL-57087_master' of git://github.com/markn86/moodle 2016-11-23 08:01:25 +08:00
Dan Poltawski 0484a0d511 Merge branch 'MDL-57075-master' of git://github.com/ryanwyllie/moodle 2016-11-22 21:14:20 +00:00
Dan Poltawski 95b25310ce Merge branch 'MDL-56795-master' of git://github.com/damyon/moodle 2016-11-22 21:01:59 +00:00
Dan Poltawski 1da2cf3bc0 Merge branch 'MDL-57018-master' of git://github.com/damyon/moodle 2016-11-22 20:59:17 +00:00
Dan Poltawski cb151980c4 Merge branch 'MDL-56656-master' of git://github.com/ankitagarwal/moodle 2016-11-22 18:05:10 +00:00
Dan Poltawski 03f450c10d Merge branch 'MDL-56987-master' of git://github.com/damyon/moodle 2016-11-22 18:01:38 +00:00
Dan Poltawski d3b13065ce Merge branch 'MDL-57012-master' of git://github.com/damyon/moodle 2016-11-22 18:01:10 +00:00
Dan Poltawski 73430100ff Merge branch 'MDL-57042-master' of git://github.com/damyon/moodle 2016-11-22 18:00:45 +00:00
AMOS bot 499f4a7823 Automatically generated installer lang files 2016-11-23 00:04:53 +08:00
Ankit Agarwal 7597ab0b99 MDL-56656 messages: Proper multilang formating in messaging pages 2016-11-22 14:51:12 +05:30
Ankit Agarwal 2561e79fca MDL-57089 boost: Fix single select rendering
Also added context docs to the template file
2016-11-22 14:06:59 +05:30
Damyon Wiese 45ed4271b7 MDL-56902 blocks: no nav / settings in boost
Upgraded sites switching to boost should not see nav/settings blocks.
2016-11-22 15:02:51 +08:00
Damyon Wiese 51718b752d MDL-56902 blocks: Prevent blocks returning when switching themes.
Now if the current theme requires some blocks that don't exist, they
will be created - but with a new flag that indicates this block should
only be returned if the current theme requires it. This allows flipping back
and forth between boost and clean without restoring the nav and settings blocks
in boost.
2016-11-22 14:53:24 +08:00
Mark Nelson 9c6c29932a MDL-56391 core_message: addressed confusing links on the profile page
1) Use the string 'Send message' rather than 'View messages'.
2) Removed the 'View messages' string as it is no longer used
   and was introduced in the new messaging UI.
3) Removed the 'View profile' link and made the user's profile
   picture a link to their profile instead, this was only
   recently plausible because of MDL-57036.
2016-11-22 14:35:19 +08:00
Damyon Wiese 8cdff4beda MDL-56584 boost: Focus on drawer when it is opened 2016-11-22 14:05:43 +08:00
Damyon Wiese 95210c6650 MDL-56987 bootstrapbase: Center align in page modals 2016-11-22 13:31:50 +08:00
Mark Nelson 3c1cdac63f MDL-57087 core_message: ignore site policy if logged in as admin 2016-11-22 13:20:49 +08:00
Frederic Massart 84979ab793 MDL-57064 course: Return all properties when getting navigation options 2016-11-22 12:58:52 +08:00
Damyon Wiese a51122983c MDL-57018 boost: Style marking guide entry form
Add boost styles to marking guide entry form.
2016-11-22 11:47:45 +08:00
Damyon Wiese e466e337b0 MDL-57018 marking guide: Style frequent comments
Style frequently used comments for bootstrap 4.
2016-11-22 11:46:01 +08:00
Ryan Wyllie a6a277f06c MDL-57075 message: notification popover see all link
The "see all" link in the notification popover should link to the full
notifications page similar to how the "see all" link in the message
popover links to the messaging page.
2016-11-22 03:44:26 +00:00
Rajesh Taneja 49cf53dd93 MDL-56797 theme_boost: Fixed css on rubric icon so text wraps 2016-11-22 07:26:25 +08:00
Damyon Wiese 00f5c95590 MDL-57012 boost: Filepicker layout fix
Use container-fluid which is always 100% wide.
2016-11-21 21:35:12 +08:00
Damyon Wiese ef25d51f5b MDL-56795 boost: Close drawer after navigating on mobile 2016-11-21 17:26:45 +08:00
Damyon Wiese 9741087ffd MDL-57042 messaging: When selecting a user, go to send message
This is the whole point of this UI - make it the default action after
searching and selecting a user. You can still get to their profile by
clicking their name in the header of the messaging pane.
2016-11-21 12:22:30 +08:00
Marina Glancy fc14932c40 MDL-57019 core_grades: change default navigation to tabs
without navigation block in boost it is not easy to navigation between gradebook sections
2016-11-21 09:31:49 +08:00
Tim Hunt edf2f7bdf1 MDL-53964 qtype_ddmarker: marker label 0 should be allowed 2016-11-20 21:32:55 +00:00
Tim Hunt 030d8f22c2 MDL-35949 quiz accessibility: move input outside label 2016-11-20 16:59:00 +00:00
Tony Butler 40e0baf08e MDL-56948 mod_assign: Don't call get_grade_item() unless we have one 2016-11-18 15:37:09 +00:00
Nadav Kavalerchik 6e402aeb0a MDL-57013 Theme_boost: Fix inline edit tooltip in RTL mode. 2016-11-16 23:38:28 +02:00
Dan Poltawski 05a25f86dd MDL-55857 boost: add example context 2016-11-16 13:24:24 +00:00
Dan Poltawski 8515e2d16d MDL-55857 boost: template for checkboxes in repo plugins
Thanks to Damyon for the suggested markup
2016-11-16 13:12:18 +00:00
258 changed files with 6053 additions and 1663 deletions
+16 -23
View File
@@ -29,7 +29,7 @@ define("MAX_USERS_TO_LIST_PER_ROLE", 10);
$contextid = required_param('contextid', PARAM_INT);
$roleid = optional_param('roleid', 0, PARAM_INT);
$returnto = optional_param('return', null, PARAM_ALPHANUMEXT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -53,7 +53,13 @@ if ($course) {
// Security.
require_login($course, false, $cm);
require_capability('moodle/role:assign', $context);
$PAGE->set_url($url);
navigation_node::override_active_url($url);
$pageurl = new moodle_url($url);
if ($returnurl) {
$pageurl->param('returnurl', $returnurl);
}
$PAGE->set_url($pageurl);
$PAGE->set_context($context);
$contextname = $context->get_context_name();
@@ -141,6 +147,10 @@ if (!empty($user) && ($user->id != $USER->id)) {
}
$PAGE->set_pagelayout('admin');
if ($context->contextlevel == CONTEXT_BLOCK) {
// Do not show blocks when changing block's settings, it is confusing.
$PAGE->blocks->show_only_fake_blocks(true);
}
$PAGE->set_title($title);
switch ($context->contextlevel) {
@@ -186,9 +196,6 @@ if ($roleid) {
// Print the form.
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
?>
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
@@ -235,18 +242,10 @@ if ($roleid) {
// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
$newroleurl = new moodle_url($PAGE->url);
if ($returnto !== null) {
$newroleurl->param('return', $returnto);
}
$select = new single_select($newroleurl, 'roleid', $nameswithcounts, $roleid, null);
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'core_role');
echo $OUTPUT->render($select);
$backurl = new moodle_url('/admin/roles/assign.php', array('contextid' => $contextid));
if ($returnto !== null) {
$backurl->param('return', $returnto);
}
echo '<p><a href="' . $backurl->out() . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '<p><a href="' . $PAGE->url . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
} else if (empty($assignableroles)) {
@@ -284,9 +283,6 @@ if ($roleid) {
}
} else if ($assigncounts[$roleid] > MAX_USERS_TO_LIST_PER_ROLE) {
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
$roleholdernames[$roleid] = '<a href="'.$assignurl.'">'.$strmorethanmax.'</a>';
} else {
$roleholdernames[$roleid] = '';
@@ -307,9 +303,6 @@ if ($roleid) {
foreach ($assignableroles as $roleid => $rolename) {
$description = format_string($DB->get_field('role', 'description', array('id'=>$roleid)));
$assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
if ($returnto !== null) {
$assignurl->param('return', $returnto);
}
$row = array('<a href="'.$assignurl.'">'.$rolename.'</a>',
$description, $assigncounts[$roleid]);
if ($showroleholders) {
@@ -322,8 +315,8 @@ if ($roleid) {
if ($context->contextlevel > CONTEXT_USER) {
if ($context->contextlevel === CONTEXT_COURSECAT && $returnto === 'management') {
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
if ($returnurl) {
$url = new moodle_url($returnurl);
} else {
$url = $context->get_url();
}
+19 -12
View File
@@ -25,6 +25,7 @@
require_once(__DIR__ . '/../../config.php');
$contextid = required_param('contextid', PARAM_INT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -49,7 +50,13 @@ require_login($course, false, $cm);
if (!has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride', 'moodle/role:override', 'moodle/role:manage'), $context)) {
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'core_role'));
}
$PAGE->set_url($url);
navigation_node::override_active_url($url);
$pageurl = new moodle_url($url);
if ($returnurl) {
$pageurl->param('returnurl', $returnurl);
}
$PAGE->set_url($pageurl);
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
$PAGE->navbar->includesettingsbase = true;
@@ -75,6 +82,10 @@ $userselector->set_rows(20);
$title = get_string('checkpermissionsin', 'core_role', $contextname);
$PAGE->set_pagelayout('admin');
if ($context->contextlevel == CONTEXT_BLOCK) {
// Do not show blocks when changing block's settings, it is confusing.
$PAGE->blocks->show_only_fake_blocks(true);
}
$PAGE->set_title($title);
switch ($context->contextlevel) {
@@ -156,16 +167,7 @@ if (!is_null($reportuser)) {
// Show UI for choosing a user to report on.
echo $OUTPUT->box_start('generalbox boxwidthnormal boxaligncenter', 'chooseuser');
echo '<form method="get" action="' . $CFG->wwwroot . '/' . $CFG->admin . '/roles/check.php" >';
// Hidden fields.
echo '<input type="hidden" name="contextid" value="' . $context->id . '" />';
if (!empty($user->id)) {
echo '<input type="hidden" name="userid" value="' . $user->id . '" />';
}
if ($isfrontpage) {
echo '<input type="hidden" name="courseid" value="' . $courseid . '" />';
}
echo '<form method="post" action="' . $PAGE->url . '" >';
// User selector.
echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>', 3);
@@ -180,7 +182,12 @@ echo $OUTPUT->box_end();
// Appropriate back link.
if ($context->contextlevel > CONTEXT_USER) {
echo html_writer::start_tag('div', array('class'=>'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href'=>$context->get_url()));
if ($returnurl) {
$backurl = new moodle_url($returnurl);
} else {
$backurl = $context->get_url();
}
echo html_writer::link($backurl, get_string('backto', '', $contextname));
echo html_writer::end_tag('div');
}
+15 -4
View File
@@ -33,7 +33,7 @@ $prevent = optional_param('prevent', 0, PARAM_BOOL);
$allow = optional_param('allow', 0, PARAM_BOOL);
$unprohibit = optional_param('unprohibit', 0, PARAM_BOOL);
$prohibit = optional_param('prohibit', 0, PARAM_BOOL);
$return = optional_param('return', null, PARAM_ALPHANUMEXT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
list($context, $course, $cm) = get_context_info_array($contextid);
@@ -56,7 +56,13 @@ if ($course) {
// Security first.
require_login($course, false, $cm);
require_capability('moodle/role:review', $context);
$PAGE->set_url($url);
navigation_node::override_active_url($url);
$pageurl = new moodle_url($url);
if ($returnurl) {
$pageurl->param('returnurl', $returnurl);
}
$PAGE->set_url($pageurl);
if ($context->contextlevel == CONTEXT_USER and $USER->id != $context->instanceid) {
$PAGE->navbar->includesettingsbase = true;
@@ -85,6 +91,11 @@ $straction = get_string('permissions', 'core_role'); // Used by tabs.php.
$currenttab = 'permissions';
$PAGE->set_pagelayout('admin');
if ($context->contextlevel == CONTEXT_BLOCK) {
// Do not show blocks when changing block's settings, it is confusing.
$PAGE->blocks->show_only_fake_blocks(true);
}
$PAGE->set_title($title);
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
@@ -219,8 +230,8 @@ echo $OUTPUT->box_end();
if ($context->contextlevel > CONTEXT_USER) {
if ($context->contextlevel === CONTEXT_COURSECAT && $return === 'management') {
$url = new moodle_url('/course/management.php', array('categoryid' => $context->instanceid));
if ($returnurl) {
$url = new moodle_url($returnurl);
} else {
$url = $context->get_url();
}
+2 -1
View File
@@ -53,7 +53,8 @@ if (has_capability('moodle/grade:manage', $systemcontext)
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null, 0,
$temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null,
GRADE_NAVMETHOD_TABS,
array(GRADE_NAVMETHOD_DROPDOWN => new lang_string('dropdown', 'grades'),
GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'),
GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades'))));
@@ -35,35 +35,25 @@
}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span class="visibleifjs">
<span data-passwordunmask="editor">
<input type="hidden"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
</a>
<a href="#" data-passwordunmask="unmask" title="{{ unmaskhint }}">
{{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }}
</a>
<span data-passwordunmask="instructions" class="form-text text-muted" style="display: none;">
{{# str }} passwordunmaskinstructions, form {{/ str }}
</span>
</span>
<noscript>
<!-- Backwards compatability for Behat -->
<input type="password"
<span data-passwordunmask="editor">
<input type="hidden"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
data-size="{{ size }}"
class="form-control d-inline-block"
>
</noscript>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
</a>
<a href="#" data-passwordunmask="unmask" title="{{ unmaskhint }}">
{{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }}
</a>
<span data-passwordunmask="instructions" class="form-text text-muted" style="display: none;">
{{# str }} passwordunmaskinstructions, form {{/ str }}
</span>
</span>
</div>
{{#js}}
@@ -325,7 +325,7 @@ Feature: Set up contextual data for tests
And I am on site homepage
And I follow "Courses"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -349,9 +349,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Grade Item 1"
And I follow "Edit Test Grade Item 1"
And I expand all fieldsets
@@ -380,8 +378,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I follow "Scales"
And I go to "Scales" in the course gradebook
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
@@ -432,9 +429,7 @@ Feature: Set up contextual data for tests
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Outcome Grade Item 1"
And I follow "Edit Test Outcome Grade Item 1"
And the field "Outcome" matches value "Grade outcome 1"
@@ -15,6 +15,7 @@ Feature: Forms manipulation
Then the field "First name" matches value "Field value"
And the "Select a country" select box should contain "Japan"
And the field "New password" matches value "TestPass"
And I take focus off "Update profile" "button"
And I press "Update profile"
@javascript
+6 -1
View File
@@ -101,6 +101,7 @@ class api {
*/
public static function get_public_config() {
global $CFG, $SITE, $PAGE, $OUTPUT;
require_once($CFG->libdir . '/authlib.php');
$context = context_system::instance();
// We need this to make work the format text functions.
@@ -132,8 +133,12 @@ class api {
}
$settings['typeoflogin'] = $typeoflogin;
// Check if the user can sign-up to return the launch URL in that case.
$cansignup = signup_is_enabled();
if ($typeoflogin == self::LOGIN_VIA_BROWSER or
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER) {
$typeoflogin == self::LOGIN_VIA_EMBEDDED_BROWSER or
$cansignup) {
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
}
@@ -77,7 +77,7 @@ class renderer extends \plugin_renderer_base {
protected function render_add_button($courseid) {
global $CFG;
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'));
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'), ['class' => 'btn btn-primary']);
$addurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('courseid' => $courseid));
return \html_writer::link($addurl, $button);
}
@@ -115,7 +115,7 @@ Feature: tool_monitor_subscriptions
And I trigger cron
And I am on site homepage
When I click on ".popover-region-notifications" "css_element"
And I click on "View more" "link" in the ".popover-region-notifications" "css_element"
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
Then I should see "New rule site level"
And I should see "The course was viewed"
@@ -137,7 +137,7 @@ Feature: tool_monitor_subscriptions
And I trigger cron
And I am on site homepage
When I click on ".popover-region-notifications" "css_element"
And I click on "View more" "link" in the ".popover-region-notifications" "css_element"
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
Then I should see "New rule course level"
And I should see "The course was viewed"
@@ -65,6 +65,6 @@ Feature: Backup user data
And I log out
And I log in as "student1"
And I follow "Course 1"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "User report" in the course gradebook
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
+13 -8
View File
@@ -96,12 +96,12 @@ echo $OUTPUT->box_start(); // The forms section at the top
<div class="mdl-align">
<form method="post" action="index.php">
<form method="post" action="index.php" class="form-inline spamcleanerform">
<div>
<label class="accesshide" for="keyword_el"><?php print_string('spamkeyword', 'tool_spamcleaner') ?></label>
<input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
<input type="text" class="form-control" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
<input type="hidden" name="sesskey" value="<?php echo sesskey();?>" />
<input type="submit" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
<input type="submit" class="btn btn-primary" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
</div>
</form>
<p><?php echo get_string('spameg', 'tool_spamcleaner');?></p>
@@ -110,7 +110,8 @@ echo $OUTPUT->box_start(); // The forms section at the top
<form method="post" action="index.php">
<div>
<input type="submit" name="autodetect" value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
<input type="submit" class="btn btn-primary" name="autodetect"
value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
</div>
</form>
@@ -256,7 +257,9 @@ function print_user_list($users_rs, $keywords) {
foreach ($users_rs as $rs){
foreach ($rs as $user) {
if (!$count) {
echo '<table border="1" width="100%" id="data-grid"><tr><th>&nbsp;</th><th>'.get_string('user','admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th><th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
echo '<table class="table table-bordered" border="1" width="100%" id="data-grid"><tr><th>&nbsp;</th>
<th>'.get_string('user', 'admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th>
<th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
}
$count++;
filter_user($user, $keywords, $count);
@@ -269,7 +272,7 @@ function print_user_list($users_rs, $keywords) {
} else {
echo '</table>';
echo '<div class="mld-align">
<button id="removeall_btn">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
<button id="removeall_btn" class="btn btn-secondary">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
</div>';
}
}
@@ -357,8 +360,10 @@ function print_user_entry($user, $keywords, $count) {
$html .= '<td align="left">'.format_text($user->description, $user->descriptionformat, array('overflowdiv'=>true)).'</td>';
$html .= '<td width="100px" align="center">';
$html .= '<button onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.get_string('deleteuser', 'admin').'</button><br />';
$html .= '<button onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.get_string('ignore', 'admin').'</button>';
$html .= '<button class="btn btn-primary" onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.
get_string('deleteuser', 'admin').'</button><br />';
$html .= '<button class="btn btn-secondary" onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.
get_string('ignore', 'admin').'</button>';
$html .= '</td>';
$html .= '</tr>';
return $html;
+4
View File
@@ -61,6 +61,10 @@ class behat_auth extends behat_base {
* @Given /^I log out$/
*/
public function i_log_out() {
// Wait for page to be loaded.
$this->wait_for_pending_js();
// Click on logout link in footer, as it's much faster.
$this->execute('behat_general::i_click_on_in_the', array(get_string('logout'), 'link', '#page-footer', "css_element"));
}
+1
View File
@@ -9,6 +9,7 @@ information provided here is intended especially for developers.
* The authentication plugin auth_radius has been moved to https://github.com/moodlehq/moodle-auth_radius
* New auth_email::user_signup_with_confirmation() method has a new optional parameter $confirmationurl to provide a different
confirmation URL.
* New signup_is_enabled() function available in lib/authlib.php to safely check if sign-up is enabled in the site.
=== 3.0 ===
@@ -27,6 +27,7 @@ Feature: Import course's contents into another course
| Description | Test forum description |
And I add the "Comments" block
And I add the "Recent blog entries" block
And I turn editing mode off
When I import "Course 1" course into "Course 2" course using this options:
Then I should see "Test database name"
And I should see "Test forum name"
@@ -26,7 +26,6 @@ Feature: Option to include groups and groupings when importing a course to anoth
| Grouping 2 | C1 | GROUPING2 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
Scenario: Include groups and groupings when importing a course to another course
Given I import "Course 1" course into "Course 2" course using this options:
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
And I press "Save and return to course"
And I follow "Course 1"
And I should see "Test page name"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
@@ -83,16 +83,19 @@ Scenario: Block should select current activity by default
When I add the "Activity results" block
And I configure the "Activity results" block
Then the field "id_config_activitygradeitemid" matches value "Test assignment 1"
And I press "Cancel"
And I follow "Course 1"
And I follow "Test assignment 2"
And I add the "Activity results" block
And I configure the "Activity results" block
And the field "id_config_activitygradeitemid" matches value "Test assignment 2"
And I press "Cancel"
And I follow "Course 1"
And I follow "Test assignment 3"
And I add the "Activity results" block
And I configure the "Activity results" block
And the field "id_config_activitygradeitemid" matches value "Test assignment 3"
And I press "Cancel"
And I follow "Course 1"
And I follow "Test page name"
And I add the "Activity results" block
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
@@ -26,8 +26,7 @@ Feature: The activity results block displays student scores as scales
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I go to "Scales" in the course gradebook
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
@@ -42,7 +41,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
@@ -43,8 +43,7 @@ Feature: The activity results block displays student scores as scales
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I go to "Scales" in the course gradebook
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
@@ -60,7 +59,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
@@ -26,8 +26,7 @@ Feature: The activity results block displays student scores as scales
| student5 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I go to "Scales" in the course gradebook
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
@@ -42,7 +41,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
@@ -43,8 +43,7 @@ Feature: The activity results block displays student scores as scales
| student6 | G3 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Scales" node in "Grade administration"
And I go to "Scales" in the course gradebook
And I press "Add a new scale"
And I set the following fields to these values:
| Name | My Scale |
@@ -60,7 +59,7 @@ Feature: The activity results block displays student scores as scales
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
+4 -5
View File
@@ -33,6 +33,8 @@ class block_login extends block_base {
function get_content () {
global $USER, $CFG, $SESSION, $OUTPUT;
require_once($CFG->libdir . '/authlib.php');
$wwwroot = '';
$signup = '';
@@ -48,11 +50,8 @@ class block_login extends block_base {
$wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
}
if (!empty($CFG->registerauth)) {
$authplugin = get_auth_plugin($CFG->registerauth);
if ($authplugin->can_signup()) {
$signup = $wwwroot . '/login/signup.php';
}
if (signup_is_enabled()) {
$signup = $wwwroot . '/login/signup.php';
}
// TODO: now that we have multiauth it is hard to find out if there is a way to change password
$forgot = $wwwroot . '/login/forgot_password.php';
@@ -18,7 +18,6 @@ Feature: Edit activities in social activities block
Given I log in as "user1"
And I follow "Course 1"
And I turn editing mode on
And I add the "Social activities" block
And I set the field "Add an activity to section 'section 0'" to "Forum"
And I set the field "Forum name" to "My forum name"
And I press "Save and return to course"
+20
View File
@@ -113,4 +113,24 @@ class behat_blocks extends behat_base {
array("Configure", "link", $this->escape($blockname), "block")
);
}
/**
* Ensures that block can be added to the page but does not actually add it.
*
* @Then /^the add block selector should contain "(?P<block_name_string>(?:[^"]|\\")*)" block$/
* @param string $blockname
*/
public function the_add_block_selector_should_contain_block($blockname) {
$this->execute('behat_forms::the_select_box_should_contain', [get_string('addblock'), $blockname]);
}
/**
* Ensures that block can not be added to the page.
*
* @Then /^the add block selector should not contain "(?P<block_name_string>(?:[^"]|\\")*)" block$/
* @param string $blockname
*/
public function the_add_block_selector_should_not_contain_block($blockname) {
$this->execute('behat_forms::the_select_box_should_not_contain', [get_string('addblock'), $blockname]);
}
}
@@ -38,5 +38,5 @@ Feature: Allowed blocks controls
When I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
Then the "Add a block" select box should not contain "Activities"
And the "Add a block" select box should not contain "Course completion status"
Then the add block selector should not contain "Activities" block
And the add block selector should not contain "Course completion status" block
+11 -5
View File
@@ -1786,6 +1786,12 @@ class core_cache_testcase extends advanced_testcase {
$this->assertArrayHasKey('cache_is_searchable', $cache->phpunit_get_store_implements());
}
/**
* Test static acceleration
*
* Note: All the assertGreaterThanOrEqual() in this test should be assertGreaterThan() be because of some microtime()
* resolution problems under some OSs / PHP versions, we are accepting equal as valid outcome. For more info see MDL-57147.
*/
public function test_static_acceleration() {
$instance = cache_config_testing::instance();
$instance->phpunit_add_definition('phpunit/accelerated', array(
@@ -1892,7 +1898,7 @@ class core_cache_testcase extends advanced_testcase {
$this->assertTrue($cache->set('b', $cacheableobject2));
$staticaccelerationreturntime = $cache->phpunit_static_acceleration_get('a')->propertytime;
$staticaccelerationreturntimeb = $cache->phpunit_static_acceleration_get('b')->propertytime;
$this->assertGreaterThan($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
$this->assertGreaterThanOrEqual($startmicrotime, $staticaccelerationreturntime, 'Restore time of static must be newer.');
// Reset the static cache without resetting backing store.
$cache->phpunit_static_acceleration_purge();
@@ -1900,12 +1906,12 @@ class core_cache_testcase extends advanced_testcase {
// Get the value from the backend store, populating the static cache.
$cachevalue = $cache->get('a');
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
$this->assertGreaterThan($staticaccelerationreturntime, $cachevalue->propertytime);
$this->assertGreaterThanOrEqual($staticaccelerationreturntime, $cachevalue->propertytime);
$backingstorereturntime = $cachevalue->propertytime;
$results = $cache->get_many(array('b'));
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
$this->assertGreaterThan($staticaccelerationreturntimeb, $results['b']->propertytime);
$this->assertGreaterThanOrEqual($staticaccelerationreturntimeb, $results['b']->propertytime);
$backingstorereturntimeb = $results['b']->propertytime;
// Obtain the value again and confirm that static cache is using wake_from_cache.
@@ -1913,11 +1919,11 @@ class core_cache_testcase extends advanced_testcase {
// value is stored serialized in the static acceleration cache.
$cachevalue = $cache->phpunit_static_acceleration_get('a');
$this->assertInstanceOf('cache_phpunit_dummy_object', $cachevalue);
$this->assertGreaterThan($backingstorereturntime, $cachevalue->propertytime);
$this->assertGreaterThanOrEqual($backingstorereturntime, $cachevalue->propertytime);
$results = $cache->get_many(array('b'));
$this->assertInstanceOf('cache_phpunit_dummy_object', $results['b']);
$this->assertGreaterThan($backingstorereturntimeb, $results['b']->propertytime);
$this->assertGreaterThanOrEqual($backingstorereturntimeb, $results['b']->propertytime);
/** @var cache_phpunit_application $cache */
$cache = cache::make('phpunit', 'accelerated2');
+48 -36
View File
@@ -144,7 +144,8 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'action', 'value' => 'new'));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'course', 'value' => $courseid));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name' => 'time', 'value' => $time));
$output .= html_writer::empty_tag('input', array('type'=>'submit', 'value' => get_string('newevent', 'calendar')));
$attributes = array('type' => 'submit', 'value' => get_string('newevent', 'calendar'), 'class' => 'btn btn-secondary');
$output .= html_writer::empty_tag('input', $attributes);
$output .= html_writer::end_tag('div');
$output .= html_writer::end_tag('form');
$output .= html_writer::end_tag('div');
@@ -222,6 +223,37 @@ class core_calendar_renderer extends plugin_renderer_base {
$context = $event->context;
$output = '';
$output .= $this->output->box_start('card-header clearfix');
if (calendar_edit_event_allowed($event) && $showactions) {
if (empty($event->cmid)) {
$editlink = new moodle_url(CALENDAR_URL.'event.php', array('action' => 'edit', 'id' => $event->id));
$deletelink = new moodle_url(CALENDAR_URL.'delete.php', array('id' => $event->id));
if (!empty($event->calendarcourseid)) {
$editlink->param('course', $event->calendarcourseid);
$deletelink->param('course', $event->calendarcourseid);
}
} else {
$params = array('update' => $event->cmid, 'return' => true, 'sesskey' => sesskey());
$editlink = new moodle_url('/course/mod.php', $params);
$deletelink = null;
}
$commands = html_writer::start_tag('div', array('class' => 'commands pull-xs-right'));
$commands .= html_writer::start_tag('a', array('href' => $editlink));
$url = $this->output->pix_url('t/edit');
$str = get_string('tt_editevent', 'calendar');
$commands .= html_writer::empty_tag('img', array('src' => $url, 'alt' => $str, 'title' => $str, 'class' => 'icon'));
$commands .= html_writer::end_tag('a');
if ($deletelink != null) {
$commands .= html_writer::start_tag('a', array('href' => $deletelink));
$url = $this->output->pix_url('t/delete');
$str = get_string('tt_deleteevent', 'calendar');
$commands .= html_writer::empty_tag('img', array('src' => $url, 'alt' => $str, 'title' => $str, 'class' => 'icon'));
$commands .= html_writer::end_tag('a');
}
$commands .= html_writer::end_tag('div');
$output .= $commands;
}
if (!empty($event->icon)) {
$output .= $event->icon;
} else {
@@ -234,12 +266,9 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= $this->output->heading(
format_string($event->name, false, array('context' => $context)),
3,
array('class' => 'name')
array('class' => 'name d-inline-block')
);
}
if (!empty($event->courselink)) {
$output .= html_writer::tag('div', $event->courselink, array('class' => 'course'));
}
// Show subscription source if needed.
if (!empty($event->subscription) && $CFG->calendar_showicalsource) {
if (!empty($event->subscription->url)) {
@@ -251,48 +280,31 @@ class core_calendar_renderer extends plugin_renderer_base {
$output .= html_writer::tag('div', $source, array('class' => 'subscription'));
}
if (!empty($event->time)) {
$output .= html_writer::tag('span', $event->time, array('class' => 'date'));
$output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right m-r-1'));
} else {
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), array('class' => 'date'));
$attrs = array('class' => 'date pull-xs-right m-r-1');
$output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs);
}
if (!empty($event->courselink)) {
$output .= html_writer::tag('div', $event->courselink, array('class' => 'course'));
}
$output .= $this->output->box_end();
$eventdetailshtml = '';
$eventdetailsclasses = '';
$eventdetailshtml .= format_text($event->description, $event->format, array('context' => $context));
$eventdetailsclasses .= 'description';
$eventdetailsclasses .= 'description card-block';
if (isset($event->cssclass)) {
$eventdetailsclasses .= ' '.$event->cssclass;
}
$output .= html_writer::tag('div', $eventdetailshtml, array('class' => $eventdetailsclasses));
if (calendar_edit_event_allowed($event) && $showactions) {
if (empty($event->cmid)) {
$editlink = new moodle_url(CALENDAR_URL.'event.php', array('action'=>'edit', 'id'=>$event->id));
$deletelink = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->id));
if (!empty($event->calendarcourseid)) {
$editlink->param('course', $event->calendarcourseid);
$deletelink->param('course', $event->calendarcourseid);
}
} else {
$editlink = new moodle_url('/course/mod.php', array('update'=>$event->cmid, 'return'=>true, 'sesskey'=>sesskey()));
$deletelink = null;
}
$commands = html_writer::start_tag('div', array('class'=>'commands'));
$commands .= html_writer::start_tag('a', array('href'=>$editlink));
$commands .= html_writer::empty_tag('img', array('src'=>$this->output->pix_url('t/edit'), 'alt'=>get_string('tt_editevent', 'calendar'), 'title'=>get_string('tt_editevent', 'calendar')));
$commands .= html_writer::end_tag('a');
if ($deletelink != null) {
$commands .= html_writer::start_tag('a', array('href'=>$deletelink));
$commands .= html_writer::empty_tag('img', array('src'=>$this->output->pix_url('t/delete'), 'alt'=>get_string('tt_deleteevent', 'calendar'), 'title'=>get_string('tt_deleteevent', 'calendar')));
$commands .= html_writer::end_tag('a');
}
$commands .= html_writer::end_tag('div');
$output .= $commands;
if (!empty($eventdetailshtml)) {
$output .= html_writer::tag('div', $eventdetailshtml, array('class' => $eventdetailsclasses));
}
return html_writer::tag('div', $output , array('class' => 'event', 'id' => 'event_' . $event->id));
$eventhtml = html_writer::tag('div', $output, array('class' => 'card'));
return html_writer::tag('div', $eventhtml, array('class' => 'event', 'id' => 'event_' . $event->id));
}
/**
@@ -580,7 +592,7 @@ class core_calendar_renderer extends plugin_renderer_base {
$courseurl = new moodle_url($returnurl);
$courseurl->remove_params('course');
$select = new single_select($courseurl, 'course', $courseoptions, $selected, null);
$select->class = 'cal_courses_flt';
$select->class = 'cal_courses_flt m-r-1';
if ($label !== null) {
$select->set_label($label);
} else {
+2 -2
View File
@@ -96,7 +96,7 @@ Feature: Perform basic calendar functionality
| Type of event | user |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I click on "//div[@class='commands']//a[contains(@href, 'delete')]" "xpath_element"
And I click on "Delete event" "link" in the ".event div.commands" "css_element"
And I click on "Delete" "button"
And I should not see "Really awesome event!"
@@ -105,7 +105,7 @@ Feature: Perform basic calendar functionality
| Type of event | user |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I click on "//div[@class='commands']//a[contains(@href, 'edit')]" "xpath_element"
And I click on "Edit event" "link" in the ".event div.commands" "css_element"
And I set the following fields to these values:
| Event title | Mediocre event :( |
| Description | Wait, this event isn't that great. |
+1 -1
View File
@@ -168,7 +168,7 @@ if (!empty($CFG->enablecalendarexport)) {
array('preset_what'=>'all', 'preset_time' => 'recentupcoming', 'userid' => $USER->id, 'authtoken'=>$authtoken)
);
echo html_writer::tag('a', 'iCal',
array('href' => $link, 'title' => get_string('quickdownloadcalendar', 'calendar'), 'class' => 'ical-link'));
array('href' => $link, 'title' => get_string('quickdownloadcalendar', 'calendar'), 'class' => 'ical-link m-l-1'));
}
}
+2 -1
View File
@@ -88,7 +88,8 @@ if (empty($action)) {
$return = $manager->print_comments($page);
// if no comments available, $return will be false
if ($return) {
echo '<input type="submit" id="comments_delete" name="batchdelete" value="'.get_string('delete').'" />';
echo '<input type="submit" class="btn btn-primary" id="comments_delete" name="batchdelete"
value="'.get_string('delete').'" />';
}
echo '</form>';
}
+2 -1
View File
@@ -157,7 +157,8 @@ class comment_manager {
$table = new html_table();
$table->head = array (
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id'=>'comment_select_all', 'class'=>'comment-report-selectall')),
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id' => 'comment_select_all',
'class' => 'm-r-1')),
get_string('author', 'search'),
get_string('content'),
get_string('action')
+14 -3
View File
@@ -168,6 +168,7 @@ class helper {
* @return array
*/
public static function get_category_listitem_actions(\coursecat $category) {
global $PAGE;
$baseurl = new \moodle_url('/course/management.php', array('categoryid' => $category->id, 'sesskey' => \sesskey()));
$actions = array();
// Edit.
@@ -249,11 +250,11 @@ class helper {
);
}
// Roles.
// Assign roles.
if ($category->can_review_roles()) {
$actions['assignroles'] = array(
'url' => new \moodle_url('/admin/roles/assign.php', array('contextid' => $category->get_context()->id,
'return' => 'management')),
'returnurl' => $PAGE->url->out_as_local_url(false))),
'icon' => new \pix_icon('t/assignroles', new \lang_string('assignroles', 'role')),
'string' => new \lang_string('assignroles', 'role')
);
@@ -263,12 +264,22 @@ class helper {
if ($category->can_review_permissions()) {
$actions['permissions'] = array(
'url' => new \moodle_url('/admin/roles/permissions.php', array('contextid' => $category->get_context()->id,
'return' => 'management')),
'returnurl' => $PAGE->url->out_as_local_url(false))),
'icon' => new \pix_icon('i/permissions', new \lang_string('permissions', 'role')),
'string' => new \lang_string('permissions', 'role')
);
}
// Check permissions.
if ($category->can_review_permissions()) {
$actions['checkroles'] = array(
'url' => new \moodle_url('/admin/roles/check.php', array('contextid' => $category->get_context()->id,
'returnurl' => $PAGE->url->out_as_local_url(false))),
'icon' => new \pix_icon('i/checkpermissions', new \lang_string('checkpermissions', 'role')),
'string' => new \lang_string('checkpermissions', 'role')
);
}
// Cohorts.
if ($category->can_review_cohorts()) {
$actions['cohorts'] = array(
+1 -1
View File
@@ -71,7 +71,7 @@ class format_social extends format_base {
public function get_default_blocks() {
return array(
BLOCK_POS_LEFT => array(),
BLOCK_POS_RIGHT => array()
BLOCK_POS_RIGHT => array('social_activities')
);
}
+13 -1
View File
@@ -3707,7 +3707,19 @@ function course_get_user_navigation_options($context, $course = null) {
$sitecontext = context_system::instance();
}
$options = new stdClass;
// Sets defaults for all options.
$options = (object) [
'badges' => false,
'blogs' => false,
'calendar' => false,
'competencies' => false,
'grades' => false,
'notes' => false,
'participants' => false,
'search' => false,
'tags' => false,
];
$options->blogs = !empty($CFG->enableblogs) &&
($CFG->bloglevel == BLOG_GLOBAL_LEVEL ||
($CFG->bloglevel == BLOG_SITE_LEVEL and ($isloggedin and !$isguestuser)))
+25 -3
View File
@@ -81,9 +81,31 @@ if ($switchrole > 0 && has_capability('moodle/role:switchroles', $context)) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('switchroleto'));
require_once($CFG->dirroot.'/course/switchrole_form.php');
$form = new switchrole_form(null, ['course' => $course]);
$form->display();
// Overall criteria aggregation.
$roles = array();
$assumedrole = -1;
if (is_role_switched($course->id)) {
$roles[0] = get_string('switchrolereturn');
$assumedrole = $USER->access['rsw'][$context->path];
}
$availableroles = get_switchable_roles($context);
if (is_array($availableroles)) {
foreach ($availableroles as $key => $role) {
if ($assumedrole == (int)$key) {
continue;
}
$roles[$key] = $role;
}
}
echo $OUTPUT->box(markdown_to_html(get_string('switchroleto_help')));
foreach ($roles as $key => $role) {
$url = new moodle_url('/course/switchrole.php', array('id' => $id, 'switchrole' => $key, 'returnurl' => $returnurl));
echo $OUTPUT->container($OUTPUT->single_button($url, $role), 'm-x-3 m-b-1');
}
$url = new moodle_url($returnurl);
echo $OUTPUT->container($OUTPUT->action_link($url, get_string('cancel')), 'm-x-3 m-b-1');
echo $OUTPUT->footer();
exit;
@@ -121,7 +121,7 @@ Feature: Test category management actions
And I click on "Back to Category: Cat 1" "link"
# Redirect
And I should see the "Course categories and courses" management page
And I should see "Cat 1" in the "#course-listing h3" "css_element"
And "Cat 1" "link" should exist in the "#category-listing" "css_element"
Scenario: Test I can set access permissions for a category through the management interface.
Given the following "categories" exist:
@@ -140,7 +140,7 @@ Feature: Test category management actions
And I click on "Back to Category: Cat 1" "link"
# Redirect
And I should see the "Course categories and courses" management page
And I should see "Cat 1" in the "#course-listing h3" "css_element"
And I should see "Cat 1" in the "#course-listing" "css_element"
Scenario: Test clicking to manage cohorts for a category through the management interface.
Given the following "categories" exist:
+6 -6
View File
@@ -26,9 +26,9 @@ Feature: Rename roles within a course
| Your word for 'Non-editing teacher' | Tutor |
| Your word for 'Student' | Learner |
And I press "Save and display"
And I expand "Switch role to..." node
Then I should see "Tutor"
And I should see "Learner"
And I follow "Switch role to..." in the user menu
Then "Tutor" "button" should exist
And "Learner" "button" should exist
And I follow "Participants"
And the "roleid" select box should contain "Tutor"
And the "roleid" select box should contain "Learner"
@@ -38,10 +38,10 @@ Feature: Rename roles within a course
| Your word for 'Non-editing teacher' | |
| Your word for 'Student' | |
And I press "Save and display"
And I expand "Switch role to..." node
And I follow "Switch role to..." in the user menu
And I should see "Teacher"
And I should see "Student"
And I should not see "Learner"
And "Student" "button" should exist
And "Learner" "button" should not exist
And I follow "Participants"
And the "roleid" select box should contain "Non-editing teacher"
And the "roleid" select box should contain "Student"
+8
View File
@@ -2935,12 +2935,20 @@ class core_course_courselib_testcase extends advanced_testcase {
$this->assertTrue($navoptions->tags);
$this->assertFalse($navoptions->search);
$this->assertTrue($navoptions->calendar);
$this->assertTrue($navoptions->competencies);
// Enable global search now.
$CFG->enableglobalsearch = 1;
$navoptions = course_get_user_navigation_options($context, $course);
$this->assertTrue($navoptions->search);
// Disable competencies.
$oldcompetencies = get_config('core_competency', 'enabled');
set_config('enabled', false, 'core_competency');
$navoptions = course_get_user_navigation_options($context, $course);
$this->assertFalse($navoptions->competencies);
set_config('enabled', $oldcompetencies, 'core_competency');
// Now try with a standard user.
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
+5 -2
View File
@@ -1851,23 +1851,26 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
foreach ($course['options'] as $option) {
$navoptions->{$option['name']} = $option['available'];
}
$this->assertCount(9, $course['options']);
if ($course['id'] == SITEID) {
$this->assertCount(8, $course['options']);
$this->assertTrue($navoptions->blogs);
$this->assertFalse($navoptions->notes);
$this->assertFalse($navoptions->participants);
$this->assertTrue($navoptions->badges);
$this->assertTrue($navoptions->tags);
$this->assertFalse($navoptions->grades);
$this->assertFalse($navoptions->search);
$this->assertTrue($navoptions->calendar);
$this->assertTrue($navoptions->competencies);
} else {
$this->assertCount(6, $course['options']);
$this->assertTrue($navoptions->blogs);
$this->assertFalse($navoptions->notes);
$this->assertTrue($navoptions->participants);
$this->assertTrue($navoptions->badges);
$this->assertFalse($navoptions->tags);
$this->assertTrue($navoptions->grades);
$this->assertFalse($navoptions->search);
$this->assertFalse($navoptions->calendar);
$this->assertTrue($navoptions->competencies);
}
}
+3
View File
@@ -1088,8 +1088,11 @@ class core_course_management_helper_test extends advanced_testcase {
* Tests the fetching of actions for a category.
*/
public function test_get_category_listitem_actions() {
global $PAGE;
$this->resetAfterTest(true);
$PAGE->set_url(new moodle_url('/course/management.php'));
$generator = $this->getDataGenerator();
$category = $generator->create_category();
$context = context_system::instance();
+5
View File
@@ -64,6 +64,11 @@ class behat_enrol extends behat_base {
// Set form fields.
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $table);
// Ensure we get button in focus, before pressing button.
if ($this->running_javascript()) {
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
}
// Save changes.
$this->execute("behat_forms::press_button", get_string('addinstance', 'enrol'));
+5 -5
View File
@@ -22,14 +22,14 @@ Feature: I need to export grades as text
| assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
And I press "Save changes"
@javascript
Scenario: Export grades as text
When I set the field "Grade report" to "Plain text file"
When I go to "Export > Plain text file" in the course gradebook
And I expand all fieldsets
And I click on "Course total" "checkbox"
And I set the field "Grade export decimal points" to "1"
@@ -41,7 +41,7 @@ Feature: I need to export grades as text
@javascript
Scenario: Export grades as text using real
When I set the field "Grade report" to "Plain text file"
When I go to "Export > Plain text file" in the course gradebook
And I expand all fieldsets
And I set the following fields to these values:
| Real | 1 |
@@ -52,7 +52,7 @@ Feature: I need to export grades as text
@javascript
Scenario: Export grades as text using percentages and letters
When I set the field "Grade report" to "Plain text file"
When I go to "Export > Plain text file" in the course gradebook
And I set the following fields to these values:
| Percentage | 1 |
| Letter | 1 |
@@ -65,7 +65,7 @@ Feature: I need to export grades as text
@javascript
Scenario: Export grades as text using real, percentages and letters
When I set the field "Grade report" to "Plain text file"
When I go to "Export > Plain text file" in the course gradebook
And I set the following fields to these values:
| Real | 1 |
| Percentage | 1 |
+2 -2
View File
@@ -21,14 +21,14 @@ Feature: I need to export grades as xml
| assign | C1 | a1 | Test assignment name | Submit something! |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
And I press "Save changes"
@javascript
Scenario: Export grades as text
When I navigate to "XML file" node in "Grade administration > Export"
When I go to "Export > XML file" in the course gradebook
And I expand all fieldsets
And I set the field "Grade export decimal points" to "1"
And I press "Download"
+4 -4
View File
@@ -228,7 +228,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
$remarkparams = array(
'name' => '{NAME}[criteria][{CRITERION-id}][remark]',
'id' => $remarkid,
'cols' => '65', 'rows' => '5', 'class' => 'markingguideremark',
'cols' => '65', 'rows' => '5', 'class' => 'markingguideremark form-control',
'aria-labelledby' => '{NAME}-remarklabel{CRITERION-id}'
);
@@ -239,7 +239,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
if (!empty($comments)) {
// Frequently used comments chooser.
$chooserbuttonid = 'criteria-' . $criterion['id'] . '-commentchooser';
$commentchooserparams = array('id' => $chooserbuttonid, 'class' => 'commentchooser');
$commentchooserparams = array('id' => $chooserbuttonid, 'class' => 'commentchooser btn btn-secondary');
$commentchooser = html_writer::tag('button', get_string('insertcomment', 'gradingform_guide'),
$commentchooserparams);
@@ -273,7 +273,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
$scoreinputparams = array(
'type' => 'text',
'name' => '{NAME}[criteria][{CRITERION-id}][score]',
'class' => $scoreclass,
'class' => $scoreclass . ' form-control',
'id' => '{NAME}-criteria-{CRITERION-id}-score',
'size' => '3',
'value' => $currentscore,
@@ -534,7 +534,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
}
$html = html_writer::start_tag('div', array('class' => 'options'));
$html .= html_writer::tag('div', get_string('guideoptions', 'gradingform_guide'), array('class' => 'optionsheading'));
$attrs = array('type' => 'hidden', 'name' => '{NAME}[options][optionsset]', 'value' => 1);
$attrs = array('type' => 'hidden', 'name' => '{NAME}[options][optionsset]', 'value' => 1, 'class' => 'form-control');
$html .= html_writer::empty_tag('input', $attrs);
foreach ($options as $option => $value) {
$html .= html_writer::start_tag('div', array('class' => 'option '.$option));
+14 -4
View File
@@ -813,13 +813,23 @@ function grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=fa
}
}
$tabs[] = $top_row;
$tabs[] = $bottom_row;
// Do not display rows that contain only one item, they are not helpful.
if (count($top_row) > 1) {
$tabs[] = $top_row;
}
if (count($bottom_row) > 1) {
$tabs[] = $bottom_row;
}
if (empty($tabs)) {
return;
}
$rv = html_writer::div(print_tabs($tabs, $active_plugin, $inactive, $activated, true), 'grade-navigation');
if ($return) {
return print_tabs($tabs, $active_plugin, $inactive, $activated, true);
return $rv;
} else {
print_tabs($tabs, $active_plugin, $inactive, $activated);
echo $rv;
}
}
@@ -55,7 +55,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| grade_report_showquickfeedback | 0 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I click on student "Student 2" for grade item "Item VU"
Then I should see a grade field for "Student 2" and grade item "Item VU"
And I should not see a feedback field for "Student 2" and grade item "Item VU"
@@ -93,7 +93,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
And the following should exist in the "user-grades" table:
| -1- | -16- |
| Student 1 | 90.00 |
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And the following should exist in the "user-grades" table:
| -1- | -6- | -7- | -13- | -16- |
| Student 1 | - | - | - | 90.00 |
@@ -107,7 +107,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I click on student "Student 2" for grade item "Item VU"
Then I should see a grade field for "Student 2" and grade item "Item VU"
And I should see a feedback field for "Student 2" and grade item "Item VU"
@@ -126,7 +126,9 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
And I set the field "ajaxgrade" to "Very good"
And I set the field "ajaxfeedback" to "Student 2 SU feedback"
And I press key "13" in the field "ajaxfeedback"
And I navigate to "Grader report" node in "Grade administration"
# Reload grader report:
And I go to "View > User report" in the course gradebook
And I go to "View > Grader report" in the course gradebook
And the following should exist in the "user-grades" table:
| -1- | -7- | -13- | -16- |
| Student 2 | 33.00 | Very good | 36.00 |
@@ -142,7 +144,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I click on student "Student 2" for grade item "Item VU"
Then I should see a grade field for "Student 2" and grade item "Item VU"
And I should see a feedback field for "Student 2" and grade item "Item VU"
@@ -162,7 +164,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
Then I should not see a grade field for "Student 2" and grade item "Item VL"
And I should not see a feedback field for "Student 2" and grade item "Item VL"
@@ -193,7 +195,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I change window size to "large"
And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers:
@@ -46,7 +46,7 @@ Feature: We can change what we are viewing on the grader report
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
@@ -60,8 +60,7 @@ Feature: We can change what we are viewing on the grader report
And I open "Test assignment name 2" actions menu
And I click on "Hide" "link" in the "Test assignment name 2" activity
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "Grader report" from the "Grade report" singleselect
And I go to "View > Grader report" in the course gradebook
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Course total"
@@ -97,8 +96,7 @@ Feature: We can change what we are viewing on the grader report
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "Grader report" from the "Grade report" singleselect
And I go to "View > Grader report" in the course gradebook
And I should see "Test assignment name 1"
And I should see "Test assignment name 2"
And I should see "Course total"
@@ -30,7 +30,7 @@ Feature: A teacher checks the grade history report in a course
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Rewarding assignment |
| Description | After writing your behat test go grab a beer! |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever"
And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment"
@@ -40,7 +40,7 @@ Feature: A teacher checks the grade history report in a course
And I log out
And I log in as "teacher2"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever"
And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment"
@@ -52,11 +52,11 @@ Feature: We can use Single view
| gradereport/singleview:view | Allow | teacher | Course | C1 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
Given I go to "View > Grader report" in the course gradebook
@javascript
Scenario: I can update grades, add feedback and exclude grades.
Given I select "Single view" from the "Grade report" singleselect
Given I go to "View > Single view" in the course gradebook
And I select "Student 4" from the "Select user..." singleselect
And I set the field "Override for Test assignment one" to "1"
When I set the following fields to these values:
@@ -97,8 +97,7 @@ Feature: We can use Single view
And I log out
And I log in as "teacher2"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I click on "Single view" "option"
Given I go to "View > Single view" in the course gradebook
And I click on "Student 4" "option"
And the "Exclude for Test assignment one" "checkbox" should be disabled
And the "Override for Test assignment one" "checkbox" should be enabled
@@ -106,7 +105,7 @@ Feature: We can use Single view
Scenario: Single view links work on grade report.
Given I follow "Single view for Test assignment one"
Then I should see "Test assignment one"
Then I follow "Grader report"
Then I go to "View > Grader report" in the course gradebook
And I follow "Single view for Student 1"
Then I should see "Student 1"
+14 -15
View File
@@ -32,10 +32,10 @@ Feature: View the user report as the student will see it
| assign | C1 | a6 | Test assignment six | Submit something! | 100 |
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Gradebook setup" node in "Course administration"
And I go to "Setup > Gradebook setup" in the course gradebook
And I hide the grade item "Test assignment six"
And I hide the grade item "Sub category 2"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I change window size to "large"
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
@@ -48,7 +48,7 @@ Feature: View the user report as the student will see it
And I change window size to "medium"
Scenario: View the report as the teacher themselves
When I navigate to "User report" node in "Grade administration"
When I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And I select "Myself" from the "View report as" singleselect
Then the following should exist in the "user-grade" table:
@@ -64,7 +64,7 @@ Feature: View the user report as the student will see it
| Course total | - | 383.00 | 0600 | 63.83 % | - |
Scenario: View the report as the student from both the teachers and students perspective
When I navigate to "User report" node in "Grade administration"
When I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And I select "User" from the "View report as" singleselect
Then the following should exist in the "user-grade" table:
@@ -83,7 +83,7 @@ Feature: View the user report as the student will see it
And I log out
And I log in as "student1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | - | 80.00 | 0100 | 80.00 % | - |
@@ -99,10 +99,10 @@ Feature: View the user report as the student will see it
| Test assignment six |
Scenario: View the report as the student from both the teachers and students perspective with totals excluding hidden
Given I navigate to "Course grade settings" node in "Grade administration > Setup"
Given I go to "Setup > Course grade settings" in the course gradebook
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
And I press "Save changes"
And I navigate to "User report" node in "Grade administration"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
And I select "User" from the "View report as" singleselect
Then the following should exist in the "user-grade" table:
@@ -121,7 +121,7 @@ Feature: View the user report as the student will see it
And I log out
And I log in as "student1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0100 | 80.00 % | 26.67 % |
@@ -137,10 +137,10 @@ Feature: View the user report as the student will see it
| Test assignment six |
Scenario: View the report as the student from both the teachers and students perspective with totals including hidden
Given I navigate to "Course grade settings" node in "Grade administration > Setup"
Given I go to "Setup > Course grade settings" in the course gradebook
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals including hidden items"
And I press "Save changes"
And I navigate to "User report" node in "Grade administration"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
And I select "User" from the "View report as" singleselect
Then the following should exist in the "user-grade" table:
@@ -159,7 +159,7 @@ Feature: View the user report as the student will see it
And I log out
And I log in as "student1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0100 | 80.00 % | 13.33 % |
@@ -183,11 +183,10 @@ Feature: View the user report as the student will see it
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Gradebook setup" node in "Course administration"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
And I press "Save changes"
And I navigate to "User report" node in "Grade administration"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
And I select "User" from the "View report as" singleselect
Then the following should exist in the "user-grade" table:
@@ -204,7 +203,7 @@ Feature: View the user report as the student will see it
And I log out
And I log in as "student1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0100 | 80.00 % | 13.33 % |
@@ -12,7 +12,6 @@ Feature: We can use the user report
Given I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "User report" from the "Grade report" singleselect
And I go to "View > User report" in the course gradebook
And I select "All users (0)" from the "Select all or one user" singleselect
Then I should see "No students enrolled in this course yet"
+45
View File
@@ -245,4 +245,49 @@ class behat_grade extends behat_base {
$courseid = $DB->get_field('course', 'id', array('shortname' => $coursename), MUST_EXIST);
set_config('gradebook_calculations_freeze_' . $courseid, $version);
}
/**
* Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
*
* Examples:
* - I go to "Setup > Gradebook setup" in the course gradebook
* - I go to "Scales" in the course gradebook
* - I go to "Letters > View" in the course gradebook
* - I go to "View > User report" in the course gradebook // for teachers
* - I go to "User report" in the course gradebook // for students
*
* @Given /^I go to "(?P<gradepath_string>(?:[^"]|\\")*)" in the course gradebook$/
* @param string $gradepath
*/
public function i_go_to_in_the_course_gradebook($gradepath) {
$gradepath = preg_split('/\s*>\s*/', trim($gradepath));
if (count($gradepath) > 2) {
throw new DriverException('Grade path is too long (must have no more than two items separated with ">")');
}
// If we are not on one of the gradebook pages already, follow "Grades" link in the navigation block.
$xpath = '//div[contains(@class,\'grade-navigation\')]';
if (!$this->getSession()->getPage()->findAll('xpath', $xpath)) {
$this->execute("behat_general::i_click_on_in_the", array(get_string('grades'), 'link',
get_string('pluginname', 'block_navigation'), 'block'));
}
// If the first row of the grade-navigation tabs does not have $gradepath[0] as active tab, click on it.
$link = '\'' . $this->escape($gradepath[0]) . '\'';
$xpathrow1 = $xpath . '//ul[1]//*[contains(@class,\'active\') and contains(normalize-space(.), ' . $link . ')]';
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow1)) {
$this->find('xpath', $xpath . '//ul[1]/li/a[text()=' . $link . ']')->click();
$this->wait_for_pending_js();
}
if (isset($gradepath[1])) {
// If the second row of the grade-navigation tabs does not have $gradepath[1] as active tab, click on it.
$link = '\'' . $this->escape($gradepath[1]) . '\'';
$xpathrow2 = $xpath . '//ul[2]//*[contains(@class,\'active\') and contains(normalize-space(.), ' . $link . ')]';
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow2)) {
$this->find('xpath', $xpath . '//ul[2]/li/a[text()=' . $link . ']')->click();
$this->wait_for_pending_js();
}
}
}
}
+4 -4
View File
@@ -20,7 +20,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
@javascript
@@ -32,7 +32,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
And I press "Save changes"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I click on "Edit assign Assignment1" "link"
And I should not see "Minimum grade"
@@ -44,7 +44,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
And I press "Save changes"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
Then "Edit calculation for Course total" "link" should not exist
@javascript
@@ -55,5 +55,5 @@ Feature: Site settings can be used to hide parts of the gradebook UI
And I press "Save changes"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And "tr .course input[type='text']" "css_element" should not exist
+29 -36
View File
@@ -42,7 +42,7 @@ Feature: We can use calculated grade totals
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I change window size to "large"
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one"
@@ -60,7 +60,7 @@ Feature: We can use calculated grade totals
And I set the following settings for grade item "Test assignment eight":
| Hidden | 1 |
And I change window size to "medium"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Grade display type" to "Real (percentage)"
And I press "Save changes"
@@ -74,7 +74,7 @@ Feature: We can use calculated grade totals
| Exclude empty grades | 0 |
And I turn editing mode off
Then I should see "30.00 (30.00 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -96,7 +96,7 @@ Feature: We can use calculated grade totals
| Item weight | 3 |
And I turn editing mode off
Then I should see "27.14 (27.14 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -116,7 +116,7 @@ Feature: We can use calculated grade totals
| Extra credit | 1 |
And I turn editing mode off
Then I should see "45.19 (45.19 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -136,7 +136,7 @@ Feature: We can use calculated grade totals
| Extra credit weight | 2 |
And I turn editing mode off
Then I should see "42.50 (42.50 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -154,7 +154,7 @@ Feature: We can use calculated grade totals
| Exclude empty grades | 0 |
And I turn editing mode off
Then I should see "26.67 (26.67 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -176,7 +176,7 @@ Feature: We can use calculated grade totals
| Hidden | 1 |
And I turn editing mode off
Then I should see "0.00 (0.00 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -196,7 +196,7 @@ Feature: We can use calculated grade totals
| Hidden | 1 |
And I turn editing mode off
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -216,7 +216,7 @@ Feature: We can use calculated grade totals
| Hidden | 1 |
And I turn editing mode off
Then I should see "50.00 (50.00 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items"
And I press "Save changes"
And I log out
@@ -236,16 +236,15 @@ Feature: We can use calculated grade totals
And the following "grade items" exist:
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I press "Save changes"
@@ -258,9 +257,7 @@ Feature: We can use calculated grade totals
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test outcome item one":
| Extra credit | 1 |
And I log out
@@ -272,9 +269,7 @@ Feature: We can use calculated grade totals
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
| Include outcomes in aggregation | 0 |
@@ -297,9 +292,7 @@ Feature: We can use calculated grade totals
And the following "grade items" exist:
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I click on "Grades" "link" in the "Navigation" "block"
And I expand "Setup" node
And I follow "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
@@ -307,10 +300,10 @@ Feature: We can use calculated grade totals
And I set the following settings for grade item "Test outcome item one":
| Weight adjusted | 1 |
| aggregationcoef2 | 100 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I press "Save changes"
@@ -338,13 +331,13 @@ Feature: We can use calculated grade totals
| Extra credit | 1 |
And I turn editing mode off
Then I should see "152.68 (24.43 %)" in the ".course" "css_element"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "Show contribution to course total" to "Show"
And I set the field "Show weightings" to "Show"
And I press "Save changes"
And I select "User report" from the "Grade report" singleselect
And I go to "View > User report" in the course gradebook
And I select "Myself" from the "View report as" singleselect
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
@@ -379,7 +372,7 @@ Feature: We can use calculated grade totals
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I set the following settings for grade item "Sub category 1":
| Aggregation | Natural |
@@ -390,7 +383,7 @@ Feature: We can use calculated grade totals
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the following fields to these values:
| Category name | Sub category 3 |
@@ -412,7 +405,7 @@ Feature: We can use calculated grade totals
| Item name | Manual item 3 |
| Grade category | Sub category 3 |
And I press "Save changes"
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "60.00" to the user "Student 1" for the grade item "Manual item 1"
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
And I give the grade "40.00" to the user "Student 1" for the grade item "Manual item 3"
@@ -446,18 +439,18 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I turn editing mode off
And I should see "250.00 (25.25 %)" in the ".course" "css_element"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the following fields to these values:
| Category name | Sub sub category 1 |
| Parent category | Sub category 3 |
And I press "Save changes"
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I should see "270.00 (24.77 %)" in the ".course" "css_element"
@javascript
Scenario: Natural aggregation from the setup screen
And I select "Gradebook setup" from the "Grade report" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
And I set the following settings for grade item "Sub category 1":
@@ -519,7 +512,7 @@ Feature: We can use calculated grade totals
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I turn editing mode off
And I select "Gradebook setup" from the "Grade report" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "0"
And I set the field "Override weight of Test assignment six" to "1"
@@ -527,14 +520,14 @@ Feature: We can use calculated grade totals
And I set the field "Override weight of Test assignment nine" to "1"
And I set the field "Weight of Test assignment nine" to "100"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I set the field "Show contribution to course total" to "Show"
And I set the field "Show weightings" to "Show"
And I press "Save changes"
Then I should see "75.00 (16.85 %)" in the ".course" "css_element"
And I select "User report" from the "Grade report" singleselect
And I go to "View > User report" in the course gradebook
And I select "Myself" from the "View report as" singleselect
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
@@ -35,8 +35,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I follow "Edit Cat mean"
And I set the following fields to these values:
@@ -336,13 +335,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
@javascript
Scenario: Switching grade items between categories
# Move to same aggregation (Natural).
Given I navigate to "Gradebook setup" node in "Grade administration > Setup"
Given I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
When I select "Cat natural" from the "Move selected items to" singleselect
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
Then the field "Weight adjusted" matches value "0"
And the field "Extra credit" matches value "0"
@@ -362,13 +361,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And the field "Extra credit" matches value "1"
And I press "Cancel"
# Move to Mean of grades (with extra credit).
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I select "Cat ec" from the "Move selected items to" singleselect
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
And the field "Extra credit" matches value "0"
And I press "Cancel"
@@ -382,13 +381,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And the field "Extra credit" matches value "1"
And I press "Cancel"
# Move to Simple weight mean of grades.
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I select "Cat simple" from the "Move selected items to" singleselect
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
And the field "Extra credit" matches value "0"
And I press "Cancel"
@@ -402,13 +401,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And the field "Extra credit" matches value "1"
And I press "Cancel"
# Move to Weighted mean of grades.
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I select "Cat weighted" from the "Move selected items to" singleselect
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
And the field "Item weight" matches value "1"
And I set the field "Item weight" to "2"
@@ -426,14 +425,14 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And I set the field "Item weight" to "11"
And I press "Save changes"
# Move to same (Weighted mean of grades).
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I select "Cat weighted2" from the "Move selected items to" singleselect
And I wait "2" seconds
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
And the field "Item weight" matches value "2"
And I press "Save changes"
@@ -447,13 +446,13 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And the field "Item weight" matches value "11"
And I press "Save changes"
# Move back to Natural.
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Select Item a1" to "1"
And I set the field "Select Item a2" to "1"
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I select "Course 1" from the "Move selected items to" singleselect
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I follow "Edit Item a1"
And the field "Weight adjusted" matches value "0"
And the field "Extra credit" matches value "0"
+5 -6
View File
@@ -24,19 +24,18 @@ Feature: Average grades are displayed in the gradebook
And I am on site homepage
And I follow "Course 1"
# Enable averages
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Show average | Show |
And I press "Save changes"
# Add a manual grade item
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | Manual item 1 |
And I press "Save changes"
# Give all student the same grade for the manual grade item
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 1"
And I give the grade "50.00" to the user "Student 2" for the grade item "Manual item 1"
@@ -52,7 +51,7 @@ Feature: Average grades are displayed in the gradebook
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
# Check the admin grade table
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
Then I should see "50.00" in the ".avg.r0.lastrow .c1" "css_element"
Then I should see "50.00" in the ".avg.r0.lastrow .c2" "css_element"
And I log out
@@ -61,7 +60,7 @@ Feature: Average grades are displayed in the gradebook
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "User report" in the course gradebook
Then I should see "50.00" in the ".level2.column-grade" "css_element"
Then I should see "50.00" in the ".level2.column-average" "css_element"
And I log out
@@ -21,8 +21,7 @@ Feature: Calculated grade items can be used in the gradebook
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
@javascript
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed
@@ -39,11 +38,11 @@ Feature: Calculated grade items can be used in the gradebook
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
| Maximum grade | 50 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -66,24 +65,24 @@ Feature: Calculated grade items can be used in the gradebook
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
| Maximum grade | 50 |
And I follow "Grader report"
And I turn editing mode on
And I go to "View > Grader report" in the course gradebook
And I press "Turn editing on"
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 050 | 75.00 % | - |
| Course total | - | 37.50 | 050 | 75.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat":
| Maximum grade | 40 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -96,11 +95,11 @@ Feature: Calculated grade items can be used in the gradebook
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 040 | 81.25 % | - |
| Course total | - | 32.50 | 040 | 81.25 % | - |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -128,29 +127,29 @@ Feature: Calculated grade items can be used in the gradebook
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item":
| Maximum grade | 50 |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes"
And I follow "Grader report"
And I turn editing mode on
And I go to "View > Grader report" in the course gradebook
And I press "Turn editing on"
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 66.67 % | 75.00 | 0100 | 75.00 % | 50.00 % |
| calc item | 33.33 % | 37.50 | 050 | 75.00 % | 25.00 % |
| Course total | - | 112.50 | 0150 | 75.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "calc item":
| Rescale existing grades | No |
| Maximum grade | 40 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -22,8 +22,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
@javascript
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed
@@ -40,11 +39,11 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
| Maximum grade | 50 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -67,24 +66,24 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat":
| Maximum grade | 50 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0100 | 37.50 % | - |
| Course total | - | 37.50 | 0100 | 37.50 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Calc cat":
| Maximum grade | 40 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -97,11 +96,11 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| grade item 1 | - | 65.00 | 0100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0100 | 32.50 % | - |
| Course total | - | 32.50 | 0100 | 32.50 % | - |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -129,29 +128,29 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item":
| Maximum grade | 50 |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes"
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
When I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 50.00 % | 75.00 | 0100 | 75.00 % | 37.50 % |
| calc item | 50.00 % | 37.50 | 0100 | 37.50 % | 18.75 % |
| Course total | - | 112.50 | 0200 | 56.25 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "calc item":
| Rescale existing grades | No |
| Maximum grade | 40 |
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -30,7 +30,7 @@ Feature: We can understand the gradebook user report
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -39,11 +39,11 @@ Feature: We can understand the gradebook user report
And I give the grade "70.00" to the user "Student 1" for the grade item "Test assignment five"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment six"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I set the field "Grade report" to "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the field "Category name" to "Sub category"
And I press "Save changes"
@@ -59,7 +59,7 @@ Feature: We can understand the gradebook user report
Scenario: Mean of grades aggregation
And I set the following settings for grade item "Course 1":
| Aggregation | Mean of grades |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -84,7 +84,7 @@ Feature: We can understand the gradebook user report
| Item weight | 1.0 |
And I set the following settings for grade item "Sub category":
| Item weight | 1.0 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -105,7 +105,7 @@ Feature: We can understand the gradebook user report
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "Test assignment three":
| Extra credit | 1 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -124,7 +124,7 @@ Feature: We can understand the gradebook user report
| Aggregation | Mean of grades (with extra credits) |
And I set the following settings for grade item "Test assignment three":
| Extra credit weight | 1.0 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -141,7 +141,7 @@ Feature: We can understand the gradebook user report
Scenario: Median of grades aggregation
And I set the following settings for grade item "Course 1":
| Aggregation | Median of grades |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -158,7 +158,7 @@ Feature: We can understand the gradebook user report
Scenario: Lowest grade aggregation
And I set the following settings for grade item "Course 1":
| Aggregation | Lowest grade |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -175,7 +175,7 @@ Feature: We can understand the gradebook user report
Scenario: Highest grade aggregation
And I set the following settings for grade item "Course 1":
| Aggregation | Highest grade |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -192,7 +192,7 @@ Feature: We can understand the gradebook user report
Scenario: Mode of grades aggregation
And I set the following settings for grade item "Course 1":
| Aggregation | Mode of grades |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -213,7 +213,7 @@ Feature: We can understand the gradebook user report
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "Test assignment three":
| Extra credit | 1 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -232,7 +232,7 @@ Feature: We can understand the gradebook user report
Scenario: View user report with natural aggregation
And I set the following settings for grade item "Test assignment three":
| Extra credit | 1 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
# Check the values in the weights column.
@@ -34,7 +34,7 @@ Feature: Editing a grade item
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Gradebook setup" node in "Course administration"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the following fields to these values:
| Category name | Cat 1 |
@@ -69,11 +69,11 @@ Feature: Editing a grade item
And I should not see "You cannot change the scale, as grades already exist for this item"
Scenario: Attempting to change a category item's grade type when overridden grades already exist
Given I navigate to "Grader report" node in "Grade administration"
Given I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "Cat 1" "table_row"
When I click on "Edit settings" "link" in the "Cat 1" "table_row"
Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
@@ -85,22 +85,22 @@ Feature: Editing a grade item
And I set the field "Grade type" to "Scale"
And I set the field "Scale" to "ABCDEF"
And I press "Save changes"
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "C" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "Cat 1" "table_row"
When I click on "Edit settings" "link" in the "Cat 1" "table_row"
Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type and scale cannot be changed."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist
Scenario: Attempting to change a category item's maximum grade when no rescaling option has been chosen
Given I navigate to "Grader report" node in "Grade administration"
Given I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "Cat 1" "table_row"
And I click on "Edit settings" "link" in the "Cat 1" "table_row"
And I set the field "Maximum grade" to "50"
@@ -21,8 +21,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | Manual item 1 |
@@ -40,14 +39,14 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I set the following fields to these values:
| Item name | Manual item 4 |
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weighting" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1"
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2"
@@ -56,7 +55,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I press "Save changes"
Scenario Outline: The contribution of extra credit items is normalised
Given I set the field "Grade report" to "Gradebook setup"
Given I go to "Setup > Gradebook setup" in the course gradebook
When I set the following settings for grade item "Course 1":
| Aggregation | <aggregation> |
And I set the following settings for grade item "Manual item 2":
@@ -65,7 +64,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
| Extra credit | 1 |
And I set the following settings for grade item "Manual item 4":
| Extra credit | 1 |
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
@@ -22,34 +22,33 @@ Feature: We can change the maximum and minimum number of points for manual items
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | Manual item 1 |
| Minimum grade | 0 |
| Maximum grade | 100 |
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
Scenario: Change maximum number of points on a graded item.
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1"
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1"
And I press "Save changes"
When I navigate to "Gradebook setup" node in "Grade administration > Setup"
When I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "Manual item 1" "table_row"
And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
And I set the following fields to these values:
| Maximum grade | 10 |
| Rescale existing grades | No |
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
@@ -58,14 +57,14 @@ Feature: We can change the maximum and minimum number of points for manual items
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 8.00 | 80.00 % |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "Manual item 1" "table_row"
And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
And I set the following fields to these values:
| Maximum grade | 20 |
| Rescale existing grades | Yes |
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
+3 -5
View File
@@ -35,7 +35,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
When I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three"
@@ -44,8 +44,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
| Hidden | 1 |
And I press "Save changes"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "User report" from the "Grade report" singleselect
And I go to "View > User report" in the course gradebook
And I select "Myself" from the "View report as" singleselect
And I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
@@ -57,8 +56,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
When I log out
And I log in as "student1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "User report" node in "Grade administration"
And I go to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 100.00 % | 50.00 | 0100 | 50.00 % | 25.00 % |
@@ -30,7 +30,7 @@ Feature: Editing a grade item
And I press "Save changes"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Gradebook setup" node in "Course administration"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | MI 1 |
@@ -54,11 +54,11 @@ Feature: Editing a grade item
And I should not see "You cannot change the scale, as grades already exist for this item"
Scenario: Attempting to change a manual item's grade type when grades already exist
Given I navigate to "Grader report" node in "Grade administration"
Given I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "MI 1" "table_row"
When I click on "Edit settings" "link" in the "MI 1" "table_row"
Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
@@ -70,22 +70,22 @@ Feature: Editing a grade item
And I set the field "Grade type" to "Scale"
And I set the field "Scale" to "ABCDEF"
And I press "Save changes"
And I navigate to "Grader report" node in "Grade administration"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "C" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "MI 1" "table_row"
When I click on "Edit settings" "link" in the "MI 1" "table_row"
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed."
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist
Scenario: Attempting to change a manual item's maximum grade when no rescaling option has been chosen
Given I navigate to "Grader report" node in "Grade administration"
Given I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I click on "Edit" "link" in the "MI 1" "table_row"
And I click on "Edit settings" "link" in the "MI 1" "table_row"
And I set the field "Maximum grade" to "50"
@@ -22,18 +22,17 @@ Feature: We can customise the letter boundary of a course.
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "Course grade settings" from the "Grade report" singleselect
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Grade display type | Letter |
And I press "Save changes"
And I navigate to "Letters" node in "Grade administration"
And I go to "Letters" in the course gradebook
And I follow "Edit grade letters"
And I set the following fields to these values:
| id_override | 1 |
| id_gradeboundary10 | 57 |
And I press "Save changes"
And I select "Grader report" from the "Grade report" singleselect
And I go to "View > Grader report" in the course gradebook
And I press "Turn editing on"
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one"
And I press "Save changes"
@@ -23,18 +23,17 @@ Feature: We can customise the letter boundary of a course.
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I select "Course grade settings" from the "Grade report" singleselect
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Grade display type | Letter |
And I press "Save changes"
And I navigate to "Letters" node in "Grade administration"
And I go to "Letters" in the course gradebook
And I follow "Edit grade letters"
And I set the following fields to these values:
| id_override | 1 |
| id_gradeboundary10 | 57 |
And I press "Save changes"
And I select "Grader report" from the "Grade report" singleselect
And I go to "View > Grader report" in the course gradebook
And I press "Turn editing on"
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one"
And I press "Save changes"
+5 -6
View File
@@ -27,8 +27,7 @@ Feature: We can use a minimum grade different than zero
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I am on site homepage
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | Manual item 1 |
@@ -66,14 +65,14 @@ Feature: We can use a minimum grade different than zero
| Minimum grade | 50 |
| Grade category | Sub category 2 |
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
@javascript
Scenario: Natural aggregation with negative and positive grade
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Sub category 1":
| Aggregation | Natural |
| Exclude empty grades | 0 |
@@ -86,7 +85,7 @@ Feature: We can use a minimum grade different than zero
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1"
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 2"
@@ -101,7 +100,7 @@ Feature: We can use a minimum grade different than zero
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 5"
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 6"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
+11 -12
View File
@@ -26,8 +26,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| grade_minmaxtouse | Min and max grades as specified in grade item settings |
And I am on site homepage
And I follow "C1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
| Item name | MI 1 |
@@ -57,18 +56,18 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| MI 1 | mi1 |
| MI 2 | mi2 |
| MI 3 | mi3 |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Min and max grades used in calculation" to "Default (Min and max grades as specified in grade item settings)"
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "CAT1":
| Aggregation | Natural |
And I log out
And I log in as "teacher1"
And I follow "C1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1"
And I give the grade "25.00" to the user "Student 1" for the grade item "MI 2"
@@ -77,7 +76,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
And I give the grade "20.00" to the user "Student 2" for the grade item "MI 1"
And I give the grade "10.00" to the user "Student 2" for the grade item "MI 3"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -98,7 +97,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| MI 5 | 33.33 % | 30.00 | 0100 | 30.00 % | 10.00 % |
| CAT1 total | 33.33 % | 10.00 | 0100 | 10.00 % | - |
| Course total | - | 60.00 | 0300 | 20.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "MI 1":
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
@@ -107,7 +106,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Rescale existing grades | No |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -128,11 +127,11 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| MI 5 | 50.00 % | 30.00 | 0100 | 30.00 % | 15.00 % |
| CAT1 total | 25.00 % | 10.00 | 050 | 20.00 % | - |
| Course total | - | 60.00 | 0200 | 30.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "MI 5":
| Maximum grade | 200.00 |
| Rescale existing grades | No |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -143,10 +142,10 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 5 | 66.67 % | 30.00 | 0200 | 15.00 % | 10.00 % |
| Course total | - | 60.00 | 0300 | 20.00 % | - |
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
When I set the field "Min and max grades used in calculation" to "Initial min and max grades"
And I press "Save changes"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -25,8 +25,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I set the field "Grade report" to "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)":
@@ -34,7 +33,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
@javascript
Scenario: No weights are overridden and student has all grades present
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -42,7 +41,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -56,14 +55,14 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
@javascript
Scenario: No weights are overridden, student has some grades present
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -77,12 +76,12 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
@javascript
Scenario: No weights are overridden, student has none grades present except for extra credit
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -102,14 +101,14 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three":
| Extra credit | 1 |
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -126,7 +125,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -134,7 +133,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -151,14 +150,14 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -175,12 +174,12 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -199,7 +198,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -207,7 +206,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -226,14 +225,14 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -252,12 +251,12 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -26,8 +26,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I set the field "Grade report" to "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)":
@@ -35,7 +34,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
@javascript
Scenario: No weights are overridden and student has all grades present (before the fix 20150619)
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -43,7 +42,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -57,14 +56,14 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
@javascript
Scenario: No weights are overridden, student has some grades present (before the fix 20150619)
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -78,12 +77,12 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
@javascript
Scenario: No weights are overridden, student has none grades present except for extra credit (before the fix 20150619)
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -103,14 +102,14 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three":
| Extra credit | 1 |
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -127,7 +126,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -135,7 +134,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -153,14 +152,14 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -178,12 +177,12 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
When I set the field "Override weight of Test assignment one" to "1"
And I set the field "Weight of Test assignment one" to "50"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -202,7 +201,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
@@ -210,7 +209,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -230,14 +229,14 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -257,12 +256,12 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
And I set the field "Override weight of Test assignment four (extra)" to "1"
And I set the field "Weight of Test assignment four (extra)" to "10"
And I press "Save changes"
When I click on "Grades" "link" in the "Navigation" "block"
When I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
And I press "Save changes"
And I set the field "Grade report" to "User report"
And I go to "View > User report" in the course gradebook
And I set the field "Select all or one user" to "Student 1"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -32,8 +32,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I set the field "Grade report" to "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
@javascript
Scenario: Setting all weights in a category to exactly one hundred in total.
@@ -33,8 +33,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I set the field "Grade report" to "Gradebook setup"
And I go to "Setup > Gradebook setup" in the course gradebook
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set to zero (before the fix 20150619).
@@ -16,9 +16,7 @@ Feature: Grade letters can be overridden
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I follow "Letters"
And I follow "Edit grade letters"
And I go to "Letters > Edit" in the course gradebook
Scenario Outline: Grade letters can be completely overridden
When I set the following fields to these values:
+6 -7
View File
@@ -71,12 +71,11 @@ Feature: View gradebook when scales are used
And I press "Save changes"
And I press "Ok"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
Scenario: Test displaying scales in gradebook in aggregation method Natural
@@ -92,14 +91,14 @@ Feature: View gradebook when scales are used
| -1- | -2- | -3- | -4- |
| Range | FA | 0.005.00 | 0.005.00 |
| Overall average | C | 3.00 | 3.00 |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 3" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | FA | 50.00 % | 60.00 % |
| Sub category 1 total | 3.00 | 05 | 60.00 % | - |
| Course total | 3.00 | 05 | 60.00 % | - |
And I select "Gradebook setup" from the "Grade report" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | 5.00 |
@@ -138,14 +137,14 @@ Feature: View gradebook when scales are used
| -1- | -2- | -3- | -4- |
| Range | FA | 1.005.00 | 0.00100.00 |
| Overall average | C | 3.00 | <overallavg> |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 3" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | FA | 50.00 % | <contrib3> |
| Sub category (<aggregation>) total<aggregation>. | 3.00 | 15 | 50.00 % | - |
| Course total<aggregation>. | <coursetotal3> | 0100 | <courseperc3> | - |
And I select "Gradebook setup" from the "Grade report" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | A (5) |
@@ -39,14 +39,14 @@ Feature: Control the aggregation of the scales
Scenario Outline: Scales can be excluded from aggregation
Given I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
When I give the grade "10" to the user "Student 1" for the grade item "Grade me"
And I give the grade "B" to the user "Student 1" for the grade item "Scale me"
And I press "Save changes"
And I set the following settings for grade item "Course 1":
| Aggregation | <aggregation> |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
Then the following should exist in the "user-grade" table:
| Grade item | Grade | Percentage | Contribution to course total |
@@ -60,8 +60,7 @@ Feature: Control the aggregation of the scales
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Grade | Percentage | Contribution to course total |
@@ -85,11 +84,11 @@ Feature: Control the aggregation of the scales
Scenario: Weights of scales cannot be edited when they are not aggregated
Given I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
When I set the following settings for grade item "Course 1":
| Aggregation | Natural |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Override weight of Grade me" to "1"
Then the field "Override weight of Grade me" matches value "100.00"
And I click on "Edit" "link" in the "Scale me" "table_row"
@@ -100,8 +99,7 @@ Feature: Control the aggregation of the scales
And the following config values are set as admin:
| grade_includescalesinaggregation | 1 |
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I go to "Setup > Gradebook setup" in the course gradebook
And I set the field "Override weight of Grade me" to "1"
And the field "Override weight of Grade me" matches value "95.238"
And I set the field "Override weight of Scale me" to "1"
@@ -49,12 +49,11 @@ Feature: View gradebook when single item scales are used
And I press "Save changes"
And I press "Ok"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"
And I press "Save changes"
And I follow "Grader report"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
Scenario: Test displaying single item scales in gradebook in aggregation method Natural
@@ -66,7 +65,7 @@ Feature: View gradebook when single item scales are used
| -1- | -2- | -3- | -4- |
| Range | Ace!Ace! | 0.001.00 | 0.001.00 |
| Overall average | Ace! | 1.00 | 1.00 |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
@@ -79,7 +78,7 @@ Feature: View gradebook when single item scales are used
| Test assignment one | - | Ace!Ace! | - |
| Sub category 1 total| - | 01 | - |
| Course total | - | 01 | - |
And I select "Gradebook setup" from the "jump" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | 1.00 |
@@ -104,14 +103,14 @@ Feature: View gradebook when single item scales are used
| -1- | -2- | -3- | -4- |
| Range | Ace!Ace! | 0.00100.0 | 0.00100.00 |
| Overall average | Ace! | <catavg> | <overallavg> |
And I follow "User report"
And I go to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | <contrib1> |
| Sub category (<aggregation>) total<aggregation>. | <cattotal1> | 0100 | - |
| Course total<aggregation>. | <coursetotal1> | 0100 | - |
And I select "Gradebook setup" from the "jump" singleselect
And I go to "Setup > Gradebook setup" in the course gradebook
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | Ace! (1) |
+9 -9
View File
@@ -54,7 +54,7 @@ Feature: We can set the grade to pass value
| grade[modgrade_type] | Point |
| grade[modgrade_point] | 50 |
| Grade to pass | 25 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit assign Test Assignment 1" "link"
Then the field "Grade to pass" matches value "25"
@@ -64,7 +64,7 @@ Feature: We can set the grade to pass value
And I expand all fieldsets
And I set the field "Grade to pass" to "30"
And I press "Save and return to course"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I click on "Edit assign Test Assignment 1" "link"
And the field "Grade to pass" matches value "30"
@@ -76,7 +76,7 @@ Feature: We can set the grade to pass value
| grade[modgrade_type] | Scale |
| grade[modgrade_scale] | Test Scale 1 |
| Grade to pass | 3 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit assign Test Assignment 1" "link"
And I expand all fieldsets
@@ -107,7 +107,7 @@ Feature: We can set the grade to pass value
| Submission grade to pass | 40 |
| gradinggrade | 20 |
| Assessment grade to pass | 10 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit workshop Test Workshop 1 (submission)" "link"
And I expand all fieldsets
@@ -142,7 +142,7 @@ Feature: We can set the grade to pass value
And I add a "Quiz" to section "1" and I fill the form with:
| Name | Test Quiz 1 |
| Grade to pass | 9.5 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit quiz Test Quiz 1" "link"
And I expand all fieldsets
@@ -160,7 +160,7 @@ Feature: We can set the grade to pass value
| Name | Test Lesson 1 |
| Description | Test |
| Grade to pass | 90 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit lesson Test Lesson 1" "link"
And I expand all fieldsets
@@ -179,7 +179,7 @@ Feature: We can set the grade to pass value
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit data Test Database 1" "link"
And I expand all fieldsets
@@ -208,7 +208,7 @@ Feature: We can set the grade to pass value
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit forum Test Forum 1" "link"
And I expand all fieldsets
@@ -227,7 +227,7 @@ Feature: We can set the grade to pass value
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit glossary Test Glossary 1" "link"
And I expand all fieldsets
+6 -8
View File
@@ -51,17 +51,16 @@ Feature: We can enter in grades and view reports from the gradebook
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "Grades" "link" in the "Navigation" "block"
And I go to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
And I press "Save changes"
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
When I select "User report" from the "Grade report" singleselect
And the "Grade report" select box should contain "Grader report"
And the "Grade report" select box should contain "Outcomes report"
And the "Grade report" select box should contain "User report"
When I go to "View > User report" in the course gradebook
And "Grader report" "link" should exist
And "Outcomes report" "link" should exist
And the "Select all or one user" select box should contain "All users (1)"
And I log out
And I log in as "student1"
@@ -80,13 +79,12 @@ Feature: We can enter in grades and view reports from the gradebook
And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00"
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
When I select "Gradebook setup" from the "Grade report" singleselect
When I go to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Weighted mean of grades |
And I set the field "Extra credit value for Test assignment name" to "0.72"
And I press "Save changes"
And I select "User report" from the "Grade report" singleselect
And I navigate to "Course grade settings" node in "Grade administration > Setup"
And I go to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Show weightings | Show |
And I press "Save changes"
+4 -1
View File
@@ -74,7 +74,10 @@ $string['pathssubdataroot'] = '<p>Moodle potřebuje prostor, kam si bude ukláda
<p>Tento adresář ale zároveň nesmí být dostupný přímo přes webové rozhraní. .</p>
<p>Instalační skript se pokusí tento adresář vytvořit, pokud nebude existovat..</p>';
$string['pathssubdirroot'] = '<p>Absolutní cesta k adresáři s instalací Moodle.</p>';
$string['pathssubwwwroot'] = 'Zadejte úplnou webovou adresu, na níž bude Moodle dostupný. Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít. Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.';
$string['pathssubwwwroot'] = '<p>Zadejte úplnou webovou adresu, na níž bude Moodle dostupný, t.j. adresa, kterou zadají uživatelé do adresního řádku svého prohlížeče, aby spustili Moodle.</p>
<p>Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít.</p>
<p> Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.</p>
<p>Pokud aktuální adresa není správná, změňte URL adresu v adresním řádku prohlížeče a spusťte instalaci.</p>';
$string['pathsunsecuredataroot'] = 'Umístění datového adresáře není bezpečné';
$string['pathswrongadmindir'] = 'Adresář pro správu serveru (admin) neexistuje';
$string['phpextension'] = '{$a} PHP rozšíření';
+1
View File
@@ -66,4 +66,5 @@ $string['phpversionhelp'] = '<p>Moodle necesită o versiune PHP de cel puțin 4
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Vedeți această pagină deoarece ați instalat și lansat cu succes pachetul <strong>{$a->packname} {$a->packversion}</strong> în computerul dumneavoastră. Felicitări!';
$string['welcomep40'] = 'Pachetul include și <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep70'] = 'Click pe butonul "Next" de mai jos pentru a continua setarea <strong>Moodle</strong>.';
$string['wwwroot'] = 'Adresă Web';
+5 -1
View File
@@ -29,15 +29,18 @@ $string['allusers'] = 'All messages from all users';
$string['backupmessageshelp'] = 'If enabled, then instant messages will be included in SITE automated backups';
$string['blockcontact'] = 'Block contact';
$string['blocknoncontacts'] = 'Prevent non-contacts from messaging me';
$string['canceledit'] = 'Cancel editing messages';
$string['contactblocked'] = 'Contact blocked';
$string['contacts'] = 'Contacts';
$string['defaultmessageoutputs'] = 'Default message outputs';
$string['defaults'] = 'Defaults';
$string['deleteallconfirm'] = "Are you sure you would like to delete this entire conversation?";
$string['deleteallmessages'] = "Delete all messages";
$string['deleteselectedmessages'] = 'Delete selected messages';
$string['disableall'] = 'Disable notifications';
$string['disabled'] = 'Messaging is disabled on this site';
$string['disallowed'] = 'Disallowed';
$string['editmessages'] = 'Edit messages';
$string['emailtagline'] = 'This is a copy of a message sent to you at "{$a->sitename}". Go to {$a->url} to reply.';
$string['enabled'] = 'Enabled';
$string['errorcallingprocessor'] = 'Error calling defined output';
@@ -94,6 +97,7 @@ $string['outputnotconfigured'] = 'Not configured';
$string['permitted'] = 'Permitted';
$string['processorsettings'] = 'Processor settings';
$string['removecontact'] = 'Remove contact';
$string['removecoursefilter'] = 'Remove filter for course {$a}';
$string['removefromyourcontacts'] = 'Remove from your contacts';
$string['requiresconfiguration'] = 'Requires configuration';
$string['searchforuser'] = 'Search for a user';
@@ -122,8 +126,8 @@ $string['unreadnotification'] = 'Unread notification: {$a}';
$string['unreadnewmessage'] = 'New message from {$a}';
$string['userisblockingyou'] = 'This user has blocked you from sending messages to them';
$string['userisblockingyounoncontact'] = '{$a} only accepts messages from their contacts.';
$string['viewfullnotification'] = 'View full notification';
$string['viewinganotherusersmessagearea'] = 'You are viewing another user\'s message area.';
$string['viewmessages'] = 'View messages';
$string['viewmessageswith'] = 'View messages with {$a}';
$string['viewnotificationresource'] = 'Go to: {$a}';
$string['viewunreadmessageswith'] = 'View unread messages with {$a}';
+3
View File
@@ -1831,6 +1831,9 @@ $string['switchdevicedefault'] = 'Switch to the standard theme';
$string['switchdevicerecommended'] = 'Switch to the recommended theme for your device';
$string['switchrolereturn'] = 'Return to my normal role';
$string['switchroleto'] = 'Switch role to...';
$string['switchroleto_help'] = 'Choose a role to get an idea of how someone with that role will see this course.
Please note that this view may not be perfect (<a href="https://docs.moodle.org/en/Switch_roles">See details and alternatives</a>).';
$string['tag'] = 'Tag';
$string['tagalready'] = 'This tag already exists';
$string['tagmanagement'] = 'Add/delete tags ...';
+5
View File
@@ -3169,6 +3169,11 @@ function get_assignable_roles(context $context, $rolenamedisplay = ROLENAME_ALIA
function get_switchable_roles(context $context) {
global $USER, $DB;
// You can't switch roles without this capability.
if (!has_capability('moodle/role:switchroles', $context)) {
return [];
}
$params = array();
$extrajoins = '';
$extrawhere = '';
+1
View File
@@ -0,0 +1 @@
define(["jquery","core/modal_factory","core/templates","core/str","core/notification"],function(a,b,c,d,e){return{init:function(f){var g=a("[data-key=addblock]");d.get_string("addblock").done(function(e){var h=[];a.each(f.blocks,function(a,b){h[h.length]={key:"pluginname",component:"block_"+b}});var i=[];d.get_strings(h).done(function(d){a.each(d,function(a,b){i[i.length]={name:f.blocks[a],title:b}}),f.blocks=i,b.create({title:e,body:c.render("core/add_block_body",f),type:"CANCEL"},g)})}).fail(e.exception)}}});
+1
View File
@@ -0,0 +1 @@
define(["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_events"],function(a,b,c,d,e){var f={CANCEL_BUTTON:'[data-action="cancel"]'},g=function(a){d.call(this,a),this.getFooter().find(f.CANCEL_BUTTON).length||b.exception({message:"No cancel button found"})};return g.prototype=Object.create(d.prototype),g.prototype.constructor=g,g.prototype.setFooter=function(){b.exception({message:"Can not change the footer of a cancel modal"})},g.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this),this.getModal().on(c.events.activate,f.CANCEL_BUTTON,function(b,c){var d=a.Event(e.cancel);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this))},g});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/modal_events","core/modal","core/modal_save_cancel","core/modal_confirm","core/templates","core/notification","core/custom_interaction_events"],function(a,b,c,d,e,f,g,h){var i={DEFAULT:"core/modal",SAVE_CANCEL:"core/modal_save_cancel",CONFIRM:"core/modal_confirm"},j={DEFAULT:c,SAVE_CANCEL:d,CONFIRM:e},k={DEFAULT:"DEFAULT",SAVE_CANCEL:"SAVE_CANCEL",CONFIRM:"CONFIRM"},l=function(a,c){"undefined"!=typeof c&&(h.define(c,[h.events.activate]),c.on(h.events.activate,function(){a.show()}),a.getRoot().on(b.hidden,function(){c.focus()}))},m=function(b,c,d){c=a(c);var e=j[b],f=new e(c);return l(f,d),f},n=function(b,c){var d=i[b];return f.render(d,{}).then(function(d){var e=a(d);return m(b,e,c)}).fail(g.exception)},o=function(a,b){var c=a.type||k.DEFAULT,d=!!a.large;return k[c]||(c=k.DEFAULT),n(c,b).then(function(b){return"undefined"!=typeof a.title&&b.setTitle(a.title),"undefined"!=typeof a.body&&b.setBody(a.body),"undefined"!=typeof a.footer&&b.setFooter(a.footer),d&&b.setLarge(),b})};return{create:o,types:k}});
define(["jquery","core/modal_events","core/modal","core/modal_save_cancel","core/modal_confirm","core/modal_cancel","core/templates","core/notification","core/custom_interaction_events"],function(a,b,c,d,e,f,g,h,i){var j={DEFAULT:"core/modal",SAVE_CANCEL:"core/modal_save_cancel",CONFIRM:"core/modal_confirm",CANCEL:"core/modal_cancel"},k={DEFAULT:c,SAVE_CANCEL:d,CONFIRM:e,CANCEL:f},l={DEFAULT:"DEFAULT",SAVE_CANCEL:"SAVE_CANCEL",CONFIRM:"CONFIRM",CANCEL:"CANCEL"},m=function(a,c){"undefined"!=typeof c&&(i.define(c,[i.events.activate]),c.on(i.events.activate,function(b,c){a.show(),c.originalEvent.preventDefault()}),a.getRoot().on(b.hidden,function(){c.focus()}))},n=function(b,c,d){c=a(c);var e=k[b],f=new e(c);return m(f,d),f},o=function(b,c){var d=j[b];return g.render(d,{}).then(function(d){var e=a(d);return n(b,e,c)}).fail(h.exception)},p=function(a,b){var c=a.type||l.DEFAULT,d=!!a.large;return l[c]||(c=l.DEFAULT),o(c,b).then(function(b){return"undefined"!=typeof a.title&&b.setTitle(a.title),"undefined"!=typeof a.body&&b.setBody(a.body),"undefined"!=typeof a.footer&&b.setFooter(a.footer),d&&b.setLarge(),b})};return{create:p,types:l}});
+1 -1
View File
@@ -1 +1 @@
define(["core/yui","jquery","core/log"],function(a,b,c){var d={types:{success:"core/notification_success",info:"core/notification_info",warning:"core/notification_warning",error:"core/notification_error"},fieldName:"user-notifications",fetchNotifications:function(){require(["core/ajax"],function(a){var b=a.call([{methodname:"core_fetch_notifications",args:{contextid:d.contextid}}]);b[0].done(d.addNotifications)})},addNotifications:function(a){a||(a=[]),b.each(a,function(a,b){d.renderNotification(b.template,b.variables)})},setupTargetRegion:function(){var a=b("#"+d.fieldName);if(a.length)return!1;var c=b("<span>").attr("id",d.fieldName);return a=b("#region-main"),a.length?a.prepend(c):(a=b('[role="main"]'),a.length?a.prepend(c):(a=b("body"),a.prepend(c)))},addNotification:function(a){var c=d.types.error;return a=b.extend({closebutton:!0,announce:!0,type:"error"},a),a.template?(c=a.template,delete a.template):a.type&&("undefined"!=typeof d.types[a.type]&&(c=d.types[a.type]),delete a.type),d.renderNotification(c,a)},renderNotification:function(a,e){return"undefined"!=typeof e.message&&e.message?void require(["core/templates"],function(c){c.render(a,e).done(function(a,e){b("#"+d.fieldName).prepend(a),c.runTemplateJS(e)}).fail(d.exception)}):void c.debug("Notification received without content. Skipping.")},alert:function(b,c,d){a.use("moodle-core-notification-alert",function(){var a=new M.core.alert({title:b,message:c,yesLabel:d});a.show()})},confirm:function(b,c,d,e,f,g){a.use("moodle-core-notification-confirm",function(){var a=new M.core.confirm({title:b,question:c,yesLabel:d,noLabel:e});a.on("complete-yes",function(){f()}),g&&a.on("complete-no",function(){g()}),a.show()})},exception:function(b){b.backtrace&&(b.lineNumber=b.backtrace[0].line,b.fileName=b.backtrace[0].file,b.fileName="..."+b.fileName.substr(b.fileName.length-20),b.stack=b.debuginfo,b.name=b.errorcode),a.use("moodle-core-notification-exception",function(){var a=new M.core.exception(b);a.show()})}};return{init:function(a,b){d.contextid=a,d.setupTargetRegion(),d.addNotifications(b),d.fetchNotifications()},fetchNotifications:d.fetchNotifications,addNotification:d.addNotification,alert:d.alert,confirm:d.confirm,exception:d.exception}});
define(["core/yui","jquery","core/log"],function(a,b,c){var d={types:{success:"core/notification_success",info:"core/notification_info",warning:"core/notification_warning",error:"core/notification_error"},fieldName:"user-notifications",fetchNotifications:function(){require(["core/ajax"],function(a){var b=a.call([{methodname:"core_fetch_notifications",args:{contextid:d.contextid}}]);b[0].done(d.addNotifications)})},addNotifications:function(a){a||(a=[]),b.each(a,function(a,b){d.renderNotification(b.template,b.variables)})},setupTargetRegion:function(){var a=b("#"+d.fieldName);if(a.length)return!1;var c=b("<span>").attr("id",d.fieldName);return a=b("#region-main"),a.length?a.prepend(c):(a=b('[role="main"]'),a.length?a.prepend(c):(a=b("body"),a.prepend(c)))},addNotification:function(a){var c=d.types.error;return a=b.extend({closebutton:!0,announce:!0,type:"error"},a),a.template?(c=a.template,delete a.template):a.type&&("undefined"!=typeof d.types[a.type]&&(c=d.types[a.type]),delete a.type),d.renderNotification(c,a)},renderNotification:function(a,e){return"undefined"!=typeof e.message&&e.message?void require(["core/templates"],function(c){c.render(a,e).done(function(a,e){b("#"+d.fieldName).prepend(a),c.runTemplateJS(e)}).fail(d.exception)}):void c.debug("Notification received without content. Skipping.")},alert:function(b,c,d){a.use("moodle-core-notification-alert",function(){var a=new M.core.alert({title:b,message:c,yesLabel:d});a.show()})},confirm:function(b,c,d,e,f,g){a.use("moodle-core-notification-confirm",function(){var a=new M.core.confirm({title:b,question:c,yesLabel:d,noLabel:e});a.on("complete-yes",function(){f()}),g&&a.on("complete-no",function(){g()}),a.show()})},exception:function(b){if("undefined"==typeof b.stack&&(b.stack=""),b.debuginfo&&(b.stack+=b.debuginfo+"\n"),b.backtrace){b.stack+=b.backtrace;var c=b.backtrace.match(/line ([^ ]*) of/),d=b.backtrace.match(/ of ([^:]*): /);c&&c[1]&&(b.lineNumber=c[1]),d&&d[1]&&(b.fileName=d[1],b.fileName.length>30&&(b.fileName="..."+b.fileName.substr(b.fileName.length-27)))}"undefined"==typeof b.name&&b.errorcode&&(b.name=b.errorcode),a.use("moodle-core-notification-exception",function(){var a=new M.core.exception(b);a.show()})}};return{init:function(a,b){d.contextid=a,d.setupTargetRegion(),d.addNotifications(b),d.fetchNotifications()},fetchNotifications:d.fetchNotifications,addNotification:d.addNotification,alert:d.alert,confirm:d.confirm,exception:d.exception}});
+64
View File
@@ -0,0 +1,64 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Show an add block modal instead of doing it on a separate page.
*
* @module core/addblockmodal
* @class addblockmodal
* @package core
* @copyright 2016 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/modal_factory', 'core/templates', 'core/str', 'core/notification'],
function($, ModalFactory, Templates, Str, Notification) {
return /** @alias module:core/addblockmodal */ {
/**
* Global init function for this module.
*
* @method init
* @param {Object} context The template context for rendering this modal body.
*/
init: function(context) {
var addblocklink = $('[data-key=addblock]');
// We need the fetch the names of the blocks. It was too much to send in the page.
Str.get_string('addblock').done(function(title) {
var titlerequests = [];
$.each(context.blocks, function(index, key) {
titlerequests[titlerequests.length] = {key: 'pluginname', component: 'block_' + key};
});
var blocks = [];
Str.get_strings(titlerequests).done(function(titles) {
$.each(titles, function(index, title) {
blocks[blocks.length] = {name: context.blocks[index], title: title};
});
context.blocks = blocks;
ModalFactory.create({
title: title,
body: Templates.render('core/add_block_body', context),
type: 'CANCEL',
}, addblocklink);
});
}).fail(Notification.exception);
}
};
});
+77
View File
@@ -0,0 +1,77 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Contain the logic for the cancel modal.
*
* @module core/modal_cancel
* @class modal_cancel
* @package core
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/modal', 'core/modal_events'],
function($, Notification, CustomEvents, Modal, ModalEvents) {
var SELECTORS = {
CANCEL_BUTTON: '[data-action="cancel"]',
};
/**
* Constructor for the Modal.
*
* @param {object} root The root jQuery element for the modal
*/
var ModalCancel = function(root) {
Modal.call(this, root);
if (!this.getFooter().find(SELECTORS.CANCEL_BUTTON).length) {
Notification.exception({message: 'No cancel button found'});
}
};
ModalCancel.prototype = Object.create(Modal.prototype);
ModalCancel.prototype.constructor = ModalCancel;
/**
* Override parent implementation to prevent changing the footer content.
*/
ModalCancel.prototype.setFooter = function() {
Notification.exception({message: 'Can not change the footer of a cancel modal'});
return;
};
/**
* Set up all of the event handling for the modal.
*
* @method registerEventListeners
*/
ModalCancel.prototype.registerEventListeners = function() {
// Apply parent event listeners.
Modal.prototype.registerEventListeners.call(this);
this.getModal().on(CustomEvents.events.activate, SELECTORS.CANCEL_BUTTON, function(e, data) {
var cancelEvent = $.Event(ModalEvents.cancel);
this.getRoot().trigger(cancelEvent, this);
if (!cancelEvent.isDefaultPrevented()) {
this.hide();
data.originalEvent.preventDefault();
}
}.bind(this));
};
return ModalCancel;
});
+7 -3
View File
@@ -22,15 +22,16 @@
* @copyright 2016 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', 'core/modal_confirm',
define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', 'core/modal_confirm', 'core/modal_cancel',
'core/templates', 'core/notification', 'core/custom_interaction_events'],
function($, ModalEvents, Modal, ModalSaveCancel, ModalConfirm, Templates, Notification, CustomEvents) {
function($, ModalEvents, Modal, ModalSaveCancel, ModalConfirm, ModalCancel, Templates, Notification, CustomEvents) {
// The templates for each type of modal.
var TEMPLATES = {
DEFAULT: 'core/modal',
SAVE_CANCEL: 'core/modal_save_cancel',
CONFIRM: 'core/modal_confirm',
CANCEL: 'core/modal_cancel',
};
// The JS classes for each type of modal.
@@ -38,6 +39,7 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
DEFAULT: Modal,
SAVE_CANCEL: ModalSaveCancel,
CONFIRM: ModalConfirm,
CANCEL: ModalCancel,
};
// The available types of modals.
@@ -45,6 +47,7 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
DEFAULT: 'DEFAULT',
SAVE_CANCEL: 'SAVE_CANCEL',
CONFIRM: 'CONFIRM',
CANCEL: 'CANCEL',
};
/**
@@ -58,8 +61,9 @@ define(['jquery', 'core/modal_events', 'core/modal', 'core/modal_save_cancel', '
var setUpTrigger = function(modal, triggerElement) {
if (typeof triggerElement != 'undefined') {
CustomEvents.define(triggerElement, [CustomEvents.events.activate]);
triggerElement.on(CustomEvents.events.activate, function() {
triggerElement.on(CustomEvents.events.activate, function(e, data) {
modal.show();
data.originalEvent.preventDefault();
});
modal.getRoot().on(ModalEvents.hidden, function() {
+21 -4
View File
@@ -162,13 +162,30 @@ function(Y, $, log) {
exception: function(ex) {
// Fudge some parameters.
if (typeof ex.stack == 'undefined') {
ex.stack = '';
}
if (ex.debuginfo) {
ex.stack += ex.debuginfo + '\n';
}
if (ex.backtrace) {
ex.lineNumber = ex.backtrace[0].line;
ex.fileName = ex.backtrace[0].file;
ex.fileName = '...' + ex.fileName.substr(ex.fileName.length - 20);
ex.stack = ex.debuginfo;
ex.stack += ex.backtrace;
var ln = ex.backtrace.match(/line ([^ ]*) of/);
var fn = ex.backtrace.match(/ of ([^:]*): /);
if (ln && ln[1]) {
ex.lineNumber = ln[1];
}
if (fn && fn[1]) {
ex.fileName = fn[1];
if (ex.fileName.length > 30) {
ex.fileName = '...' + ex.fileName.substr(ex.fileName.length - 27);
}
}
}
if (typeof ex.name == 'undefined' && ex.errorcode) {
ex.name = ex.errorcode;
}
Y.use('moodle-core-notification-exception', function() {
var modal = new M.core.exception(ex);
+18
View File
@@ -916,3 +916,21 @@ function signup_get_user_confirmation_authplugin() {
}
return $authplugin;
}
/**
* Check if sign-up is enabled in the site. If is enabled, the function will return the authplugin instance.
*
* @return mixed false if sign-up is not enabled, the authplugin instance otherwise.
* @since Moodle 3.2
*/
function signup_is_enabled() {
global $CFG;
if (!empty($CFG->registerauth)) {
$authplugin = get_auth_plugin($CFG->registerauth);
if ($authplugin->can_signup()) {
return $authplugin;
}
}
return false;
}
+35
View File
@@ -573,6 +573,41 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
);
}
/**
* Ensures that the provided node has a attribute value set. This step can be used to check if specific
* JS has finished modifying the node.
*
* @throws ExpectationException
* @param NodeElement $node
* @param string $attribute attribute name
* @param string $attributevalue attribute value to check.
* @return void Throws an exception if it times out without the element being visible
*/
protected function ensure_node_attribute_is_set($node, $attribute, $attributevalue) {
if (!$this->running_javascript()) {
return;
}
// Exception if it timesout and the element is still there.
$msg = 'The "' . $node->getXPath() . '" xpath node is not visible and it should be visible';
$exception = new ExpectationException($msg, $this->getSession());
// It will stop spinning once the $args[1]) == $args[2], and method returns true.
$this->spin(
function($context, $args) {
if ($args[0]->getAttribute($args[1]) == $args[2]) {
return true;
}
return false;
},
array($node, $attribute, $attributevalue),
self::EXTENDED_TIMEOUT,
$exception,
true
);
}
/**
* Ensures that the provided element is visible and we can interact with it.
*
-14
View File
@@ -134,13 +134,6 @@ function behat_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
return true;
}
// No need to report the before_scenario warning generated to clear last error.
// As error_clear_last is only available in php 7.0+, we trigger E_USER_WARNING
// to clear any last error which was generated during reset in before_scenario.
if (($errno === E_USER_WARNING) && $errstr == 'before_scenario') {
return;
}
// This error handler receives E_ALL | E_STRICT, running the behat test site the debug level is
// set to DEVELOPER and will always include E_NOTICE,E_USER_NOTICE... as part of E_ALL, if the current
// error_reporting() value does not include one of those levels is because it has been forced through
@@ -183,13 +176,6 @@ function behat_shutdown_function() {
// Ignore E_WARNING, as they might come via ( @ )suppression and might lead to false failure.
if (isset($error['type']) && !($error['type'] & E_WARNING)) {
// No need to report the before_scenario warning generated to clear last error.
// As error_clear_last is only available in php 7.0+, we trigger E_USER_WARNING
// to clear any last error which was generated during reset in before_scenario.
if (($error['type'] & E_USER_WARNING) && $error['message'] == 'before_scenario') {
return;
}
$errors = behat_get_shutdown_process_errors();
$errors[] = $error;

Some files were not shown because too many files have changed in this diff Show More