1077 Commits

Author SHA1 Message Date
Rajesh Taneja
2ee249ac90
MDL-55957 behat: Set some text before selecting in Atto 2016-09-28 07:35:26 +08:00
Dan Poltawski
03b2e3a04d Merge branch 'MDL-55957-master-workshopfiles' of git://github.com/mudrd8mz/moodle 2016-09-27 10:37:06 +01:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
This is a squash of many small fixes.
The list of changes are:

Initial set of behat selectors overrides required for new theme.

set core behat selectors if not overridden by theme

Remove pause

Fix for checkboxes not saving properly

Custom override for click in the user menu

Fix for behat guessing the field type.

Behat fix for guessing the correct field type.

Fix for missing closeElementBefore mforms mess.

Fix for textareas not displaying their contents.

Fix availability form element

Fix action menu selectors for activities in a course page

Fix textareas not retaining their values

Fix selector for blocks

I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.

Fix for frozen attribute in form elements

Use input instead of button while behat is still broken

Fix for navigation selector override

Behat selector fixes and multi-select fixes for templated select

Fix for configure blocks selector + booleans for autocomplete

Fixes for course_summary behat tests

Allow optgroups in single_select

Behat fixes for block_navigation

Fixes for url form element and activity chooser selectors

blocks_social - fix specific selector for behat

Fix export_for_template for selectgroups element.

Dont set empty id on the form

Fix direct call to behat_navigation in backup context

Checkbox empty value fix

Fix for assign grading panel popouts

file picker overrides to find a file manager in the page

Fix chat tests to use element name

Make selectors in mod_data behat less specific

MDL-55839: recent activity behat test relies on time()

SQUASH Honour mform element "class" attribute on the container

SQUASH Fixes for behat in mod_forum

SQUASH search form template showing value as text next to the button

SQUASH undo double selectgroup fix

SQUASH - The slightly different structure to action menus breaks course drag and drop

SQUASH Wrap loading icon in a span so the selector still works.

SQUASH Fix fragile javascript in report_loglive

SQUASH Fix tabtree, and selectgroups for mod_feedback

Also - do-not enhance the action menu - we are dropping support for this.

SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.

SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)

SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.

SQUASH Fix lti behat tests - they were cheating and using a context step from quiz

SQUASH Behat fixes for quiz with new theme

SQUASH behat fixes for mod_wiki

SQUASH Workshop behat fixes

SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.

SQUASH Fixes for grades behat tests

SQUASH behat fixes for groups

SQUASH blacklist action menu tests

SQUASH Fix for tag form element missing "manage standard tags" link

SQUASH Incomplete fixes for course behat tests

SQUASH behat fixes for badges

SQUASH Tags fixes for behat

SQUASH filepicker fixes for behat

SQUASH Abort guessing field type when we hit 'html'

SQUASH Fix for admin/tool/behat tests

SQUASH fix for admin tool behat tests

SQUASH fix for availabilty conditions hiding "aria-hidden" elements

SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view

SQUASH Blocks fixed

Fix behaviour of unchecked checkboxes

SQUASH Remove incorrect step in user test

SQUASH behat fixes for course tests

Part of MDL-55071
2016-09-23 10:55:16 +01:00
Frederic Massart
ed7844b5f4 MDL-55224 theme_noname: RTL adjustments for auto-flipping era
Part of MDL-55071
2016-09-23 10:49:49 +01:00
David Mudrák
161131f057 MDL-55957 workshop: Add behat tests for embedded images
This tests basic functionality of the images embedded into the
instructions and conclusion fields.
2016-09-14 14:25:41 +02:00
David Mudrák
e46aec4c45 MDL-55957 workshop: Fix the embedded files serving
There was a bug with serving the files from the areas instructauthors,
instructreviewers and conclusion. These three areas should not use the
itemid in the plugininfo URLs. But they did use 0 as the itemid which
broke the file previews when browsing via server files repository.

The first part of the patch fixes all relevant calls to
file_rewrite_pluginfile_urls() so that null is now properly used instead
of zero.

The second part of the fix is that we no longer delete the first $args
element in the workshop_pluginfile() function - the itemid is not
supposed to appear there now.

The last part of the patch is that instead of repeating the same code
block copy&pasted for each file area in workshop_pluginfile(), we now
have a single block covering them all.
2016-09-14 12:14:56 +02:00
Adrian Greeve
80753d3107 MDL-41174 mod_workshop: Added workshop_refresh_events
This function was missing from this activity.
2016-09-07 14:29:13 +08:00
David Monllao
bab59f1c08 Merge branch 'MDL-54838-master' of https://github.com/nashtechdev01/moodle 2016-08-23 12:42:52 +08:00
An Pham Van
d0207fdc06 MDL-54838 workshop: Differentiate labels for each comment field.
In a Workshop activity, comment fields on Assessment forms do not properly link to the corresponding Aspect.
So screen reader users may find it difficult to complete the Assessment forms.
There should be a hidden label text for each comment field.
2016-08-19 13:44:19 +07:00
Dan Poltawski
6349765c44 Merge branch 'MDL-55360-master-workshopgradepass' of git://github.com/mudrd8mz/moodle 2016-08-01 18:57:00 +01:00
David Mudrák
aea8c5541e MDL-55360 workshop: Add tests for setting grades to pass via mod form
These scenarios should cover common cases of defining the grades to pass
pass via the workshop settings form. Note that behaviour of the fields
in terms of locale-specific decimals input (MDL-51806) is not covered
with these tests as I want to avoid installation of additional language
pack. Instead, I assume that functionality of unformat_float() is tested
separately in the core.
2016-07-28 09:54:43 +02:00
David Mudrák
3c4cc10eff MDL-55360 workshop: Emptying grades to pass should set them to zero
When editing existing workshop with a grade to pass defined, when the
field is emptied, it should be interpreted as setting it to zero. This
was not happening because unformat_float replaces the field with null,
therefore effectively unsetting it.

By casting to float, we interpret all empty values (including null) as
zeros. This behaviour is consistent with how gradebook setup UI works.
2016-07-28 09:54:43 +02:00
David Mudrák
ebf0598e21 MDL-55360 workshop: Allow creating workshops with empty grades to pass
As a regression of MDL-55360, it was not possible to create new
workshops if the field "Submission grade to pass" or "Assessment grade
to pass" was left empty. The validation failed with "You must enter a
number here".

The fields submissiongradepass and gradinggradepass are always present
as we explicitly define them in the mod form. So the isset() condition
in the validation was useless and it did not allow to submit the form
with these fields empty.

Additionally, the unformat_float() returns null only if it receives
empty value on the input. Which can't happen in our case so I am
removing this condition to improve the readability of the code.
2016-07-28 09:54:43 +02:00
David Mudrák
87b5c584fb MDL-55289 workshop: Fix files processing in example submissions
While testing the issue MDL-55289 I realized that attaching files to
workshop example submissions does not work at all and throws an error.

The reason was that in MDL-50794 (996f7e82), the variables $contentopts
and $attachmentopts were replaced with the result of the methods
submission_content_options() and submission_attachment_options().
But I forgot to perform the full refactoring in exsubmission.php too.

Attached behat test should cover both issues on this branch.
2016-07-28 09:51:16 +02:00
David Mudrák
21d49a3f93 MDL-55289 workshop: Include repository/lib.php to use its constants
As a result of MDL-41556 (146893d6), the repository/lib.php was included
in submission.php so that its constant FILE_INTERNAL could be used in
field options. Recent development in MDL-50794 (996f7e8) moved the
options declaration to standalone methods but we forgot to check they
work in exsubmission.php too.

This patch moves the repository/lib.php inclusion to where the
library is actually needed.

Additionally it unifies how options are set for overall feedback content
and overall feedback attachment fields.
2016-07-28 09:51:16 +02:00
Dan Poltawski
773a11519d Merge branch 'MDL-55278_master' of https://github.com/dmonllao/moodle 2016-07-26 11:57:09 +01:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
David Monllao
0bd8383a8b MDL-55278 search: Updating references to area namespace 2016-07-21 18:38:18 +02:00
David Monllao
1d17f51a8d Merge branch 'MDL-54832-master' of https://github.com/nashtechdev01/moodle 2016-07-11 06:47:13 +02:00
Eloy Lafuente (stronk7)
080c1e798b MDL-54934 workshop: ensure "Current phase" is always separated
Apparently some readers can join 2 adjacent spans completely, simply
adding a whitespace between them prevents that, ensuring separation.,
2016-07-06 11:30:40 +02:00
Eloy Lafuente (stronk7)
1d44e47cc4 Merge branch 'MDL-54934-master' of https://github.com/nashtechdev01/moodle 2016-07-05 20:44:14 +02:00
Loc Nguyen
e9bf00fb14 MDL-54832 workshop: adding landmark for userplantable
Accessibility enhance: add an aria-label on the userplan table so
that it's accessible to me through my screen reader
2016-07-05 20:37:56 +07:00
An Pham Van
1b0276d4bb MDL-54841 workshop: Combine links for attachment icon and text.
In a workshop activity, on the view submission page where having attachment(s), there's an accessibility issue.
There're 2 separate links for the icon and text which causes an issue for keyboard and screen reader users.
So the text and icon should be combined in one link.
2016-07-05 13:21:59 +07:00
Loc Nguyen
ddc9cff68b MDL-54934 workshop: indicate current phase
Indicate phase in page titles, current phase in userplan table
so that it's accessible to me through my screen reader
2016-07-01 19:08:53 +07:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
David Monllao
5baf32c038 Merge branch 'MDL-51806_master' of https://github.com/snake/moodle 2016-05-30 10:51:33 +08:00
Jake Dallimore
f747f5a0d5 MDL-51806 mod_workshop: Add locale support for grade values. 2016-05-30 10:25:26 +08:00
Eloy Lafuente (stronk7)
4da854a68b MDL-54677 upgrade: add 3.1.0 separation line to all upgrade scripts 2016-05-23 01:31:34 +02:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
David Monllao
c827acae2d MDL-53221 search: Renaming search areas
AMOS BEGIN
 CPY [modulename,mod_folder],[search:activity,mod_folder]
 CPY [modulename,mod_label],[search:activity,mod_label]
 CPY [modulename,mod_page],[search:activity,mod_page]
 CPY [modulename,mod_resource],[search:activity,mod_resource]
 CPY [modulename,mod_url],[search:activity,mod_url]
AMOS END
2016-05-16 13:02:02 +08:00
Helen Foster
a5061bf7b7 MDL-53980 lang: Merge English strings from the en_fix language pack 2016-04-28 18:32:03 +02:00
Rajesh Taneja
921faad9ad MDL-53571 behat: Use Escaper for escaping
xpathLiteral has been depreacted, use Escaper instead
2016-04-06 15:38:31 +08:00
Rajesh Taneja
eb9ca848fa MDL-53381 behat: Replaced chained steps with api.
Behat 3.x doesn't support chained steps and hence
this is first step to get rid of chained steps in core.
2016-04-06 11:32:49 +08:00
Rajesh Taneja
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
Andrew Nicols
80f79ad6ec Merge branch 'MDL-50175-master' of git://github.com/danpoltawski/moodle 2016-03-01 08:07:56 +08:00
David Mudrák
996f7e8228 MDL-50794 workshop: Improve the file type restricting implementation
This is basically a clean up and what I think improved version of the
original Mahmoud's patch.

The actual checking for allowed file extensions has been re-implemented
and is now covered by unit tests. The list of allowed extensions is now
also assed to the filemanager element's accepted_types option to prevent
picking other files (we still need the in-place validation though). The
form validation is simplified a bit. The custom validation of file size
introduced in the previous patch has been removed as not related to this
issue (also I believe it should not be done at this level).
2016-02-25 18:03:18 +01:00
M Kassaei
1a282212c1 MDL-50794 workshop: Allow restricting submitted file types
It was reported at the Open University that there have been some
problems with the formats of files submitted by students. Not all
students completed their outlines as a Word .doc (despite this being the
format of the template provided). Some formats (e.g. .pages) couldn’t be
translated by some of the reviewing students. Therefore, they were
unable to provide a review and the submitting students not receiving any
comments.

This patch allows the teacher to define list of allowed file types that
can be attached to submitted work and/or overall feedback in the
workshop.
2016-02-25 18:03:18 +01:00
KeenRivals
83ea83ec19 MDL-50175 graphics: Optimized SVGs with SVGO. 2016-02-25 11:56:42 +00:00
KeenRivals
26c19b02d5 MDL-50175 graphics: Optimized PNG images with optipng
Used options: -o7 -strip all and advdef -z4 -i50.

(With ./lib excluded)
2016-02-25 11:56:37 +00:00
David Monllao
e2be996171 MDL-31989 search: New search areas
Some search areas have been introduced as part of the initial search API
and search engine API implementation.
- Forum posts
- Glossary enties
- All moodle activities
2016-02-23 10:47:57 +00:00
David Monllao
11ce3ffccc Merge branch 'MDL-51839-master' of git://github.com/andrewnicols/moodle 2016-02-16 10:58:22 +08:00
Eloy Lafuente (stronk7)
e8c82aac82 MDL-51580 upgrade: clean < 2.7.0 upgrade steps
This just deletes all the upgrade steps previous to 2.7.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2016-02-15 18:38:09 +01:00
Andrew Nicols
87d567d3c5 MDL-51839 mod: Remove really old logos in gif format 2016-02-10 16:20:29 +08:00
David Mudrák
66a3df7f55 MDL-42190 workshop: Add behat tests for the submissions removal feature 2016-01-25 16:10:59 +01:00
David Mudrák
58489e11f1 MDL-42190 workshop: Improve the confirmation of submission removal
I noticed we do not need to list the names of potentially affected
reviewers. If the user (teacher) has the capability to see other
assessments (which they do in 99%), the list of assessments is displayed
at the confirmation page anyway. If for some reason they do not have the
capability, we should not list the names.

The second fix is that the action buttons (such as Delete or Edit) are
not displayed on the removal confirmation page.

And finally, as the output->confirm() wraps the message with implicit
<p>, it is not valid to pass HTML with any block elements. So instead of
concatenating the two messages, we simply define a new string for this
situation.
2016-01-25 15:17:45 +01:00
David Mudrák
3fa22899b6 MDL-42190 workshop: Fix the coding style of the patch 2016-01-25 15:17:44 +01:00
Paul Nicholls
30c52da9be MDL-42190 workshop: Add "sumbission_deleted" event
Add (and trigger) an event for deletion of submissions, so that deletions
are logged.
2016-01-25 15:17:44 +01:00
Paul Nicholls
deabe48bc5 MDL-42190 workshop: Add the ability to delete submissions
A new capability is introduced to control this, granted to teacher/admin
roles by default: mod/workshop:deletesubmissions.  Additionally, students
can delete their own submissions if they are currently able to edit them.
2016-01-25 15:17:44 +01:00
Andrew Nicols
62d0d0b46d Merge branch 'MDL-52673-master' of https://github.com/pauln/moodle 2016-01-19 10:23:53 +08:00
Eloy Lafuente (stronk7)
b9103d358d Merge branch 'MDL-52615_master' of https://github.com/nadavkav/moodle 2016-01-19 00:29:26 +01:00