168 Commits

Author SHA1 Message Date
Michael Hawkins
c2f188311e MDL-69336 lib: Reinstating tablelib column show/hide functionality
Also added behat testing for hide/show columns in participants table.
2020-08-04 15:18:39 +08:00
Andrew Nicols
a95f458cde MDL-69110 table: Remove commented code 2020-07-06 13:25:31 +08:00
Jun Pataleta
b583c46297 MDL-69110 core: Unset the correct sort data element 2020-07-04 00:47:14 +08:00
Andrew Nicols
c4bd1858db MDL-67743 table: Sort direction is an integer 2020-05-27 11:16:24 +08:00
Andrew Nicols
7d02452504 Merge branch 'MDL-67547' of https://github.com/paulholden/moodle 2020-05-26 08:06:39 +08:00
Andrew Nicols
a31a2b6d54 MDL-68508 core_table: Improve sorting to support sorting by multiple columns 2020-05-22 10:42:30 +08:00
Andrew Nicols
ed23725bc6 MDL-68463 user: Update select/show [count] links dynamically 2020-05-18 20:03:38 +08:00
Simey Lameze
d717918c87 MDL-68417 core_table: add some css styling to loading icon 2020-05-12 21:44:42 +08:00
Simey Lameze
c0db61e45f MDL-68462 core_table: add missing global 2020-05-06 14:40:33 +08:00
Simey Lameze
68c46a28d6 MDL-68462 core_table: add support for reset table preferences 2020-05-06 09:44:39 +08:00
Paul Holden
118a109499 MDL-67547 dataformat: allow plugins to declare support for HTML. 2020-05-05 19:23:32 +01:00
Andrew Nicols
5615a772a6 MDL-68454 table: Move guessing of base URL to flexible 2020-05-04 11:52:19 +08:00
Andrew Nicols
56143dd622 MDL-68454 table: Move filterset functionality to flexible_table 2020-05-04 11:52:19 +08:00
Andrew Nicols
c00552b3b0 MDL-68454 table: Move get_context from dynamic to flexible 2020-05-04 11:52:19 +08:00
Simey Lameze
e2f12c2220 MDL-67915 core_table: add support for hide and show of columns 2020-04-24 18:23:34 +08:00
Simey Lameze
4cf97b7f42 MDL-68341 core_table: add component parameter to fetch WS 2020-04-21 10:28:01 +08:00
Simey Lameze
f7b84afe15 MDL-68288 core_table: support pagination bar for dynamic tables 2020-04-09 07:06:35 +08:00
Andrew Nicols
7aa6398830 Merge branch 'MDL-68148-master' of git://github.com/rezaies/moodle 2020-04-08 11:20:39 +08:00
Shamim Rezaie
0ad48a3e68 MDL-68148 core: remove cellspacing
The cellspacing attribute of <table> is not supported in HTML5.
So the removed line did not have any effect since ages ago.
2020-04-08 11:22:34 +10:00
Andrew Nicols
c540a575db MDL-68286 table: Support initials bar for dynamic tables 2020-04-03 16:54:13 +08:00
Andrew Nicols
1c112ac5fd MDL-68286 table: Empty tables need the dynamic table wrapper 2020-04-03 12:08:48 +08:00
Simey Lameze
1592c3c498 MDL-67914 core_table: implement dynamic table sorting 2020-04-01 15:13:31 +08:00
Bas Brands
40ea67534c MDL-66999 theme_boost: @extend remove extends for tables 2019-12-12 11:27:56 +01:00
Paul Holden
d99bbd8e80 MDL-66659 core: observe viewfullnames capability in flexible_table. 2019-10-01 10:07:29 +01:00
Sagar Ghimire
a57a585cd2 MDL-48610 tablelib: Always show alphabet filter in grader report 2019-06-24 14:51:01 +10:00
Paul Holden
3c92b1d4e5 MDL-64784 core: consistent column sort direction in flexible_table. 2019-04-04 16:08:26 +01:00
Andrew Nicols
702123a1dd MDL-49399 core: Add ability to specify a header col 2019-01-15 07:55:36 +08:00
Sara Arjona
4ecb387d55 MDL-64119 user: Display full names consistently for teachers
Fix an error with users with the moodle/site:viewfullnames capability
in a course context (like teachers), to display properly the full
names in pages like the participants one.
2018-11-20 19:41:21 +01:00
Michael Hawkins
c157e137ee MDL-62618 user: Display full names consistently on users page 2018-07-05 10:08:33 +08:00
Tim Schroeder
1480277cfa MDL-60681 lib/tablelib.php: Make flexible_table class better extendable
Previously the member functions get_initial_first and get_initial_last of flexible_table were public but deprecated due to being no
longer used. Now they are used by print_initials_bar and made protected. That allows classes deriving from flexible_table to access
the first and last name initials without having to use deprecated methods.
2018-04-13 16:52:52 +02:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Mark Nelson
e0ee37e426 MDL-56046 dataformat: changes to docs, upgrade.txt and error message 2017-06-27 11:35:05 +08:00
Mark Nelson
faf45f9c47 MDL-56046 core: enable multiple sheets for flexible table 2017-06-26 13:59:30 +08:00
Tobias Reischmann
4acb33f67b MDL-59173 tablelib.php: changed default of $params in set_sql to array()
Default of $params = null leads to a problem in query_db().
There this value is used in array_merge, which can not handle null
values. If null is passed for one of the params the outcome will be null
independent of the value of the second param!
2017-06-16 10:26:31 +02:00
Ilya Tregubov
8b844f702e MDL-55941 output: Refactor and improve initialbar UX to use templates 2017-03-24 20:31:03 +11:00
Brendan Heywood
d2df110950 MDL-55941 tablelib: Improve initialbar UX 2017-03-24 20:04:41 +11:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Ilya Tregubov
b6b38f77ba MDL-55906 table: Update user preferences table when reset preferences 2016-12-08 15:02:04 +11:00
Daniel Thee Roperto
29406dded1 MDL-56231 library: Fixed PhpDoc for flexible_table constructor.
The flexible_table::__construct($uniqueid) accepts a string, not an int
as previously noted in the PhpDoc.
2016-10-03 16:07:11 +11:00
David Mudrák
4e96165e59 MDL-55660 tablelib: Fetch only a single row when auto defining columns
In a very rare cases where the columns are not declared explicitly, we
want to fetch single row only without a warning raised. This seems like
a valid use case for IGNORE_MULTIPLE flag.
2016-08-22 16:34:13 +02:00
Brendan Heywood
c32bcfe751 MDL-53973 tablelib: Fixed bug with worksheetname being ignored 2016-04-29 12:17:58 +01:00
David Monllao
9df4ae4189 MDL-51603 dataformats: coding_exception if output buffering 2016-04-21 16:20:36 +08:00
Brendan Heywood
5684cc2d1e MDL-51603 tablelib: Removed legacy export classes 2016-04-20 12:39:29 +10:00
Brendan Heywood
bdb80f6a5f MDL-51603 tablelib: Delegate to dataformat for downloading 2016-04-20 12:39:29 +10:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Neill Magill
3fca693751 MDL-44330 Assign: Assignment grading may not display expected student
Before this patch it was possible for the student displayed on the grading page to
not be the student that the user selected to grade. This would occur if:

1) The user had the table ordered by a value that could be modified,
   for example Last modified (submission), Grade, Last modified (grade)
2) Another user performed an action that was recorded in Moodle in the time
   between the user generating the table and clicking on a grade link.

If a user did not notice a different user had been loaded it could result in them giving
a grade to the incorrect user.

This patch ensures that the state of the table is cached every time it is viewed by a user
who has the capability to grade.
2015-11-24 08:42:00 +00:00
David Mudrák
19168d0934 MDL-52036 tablelib: Fix the behaviour of resetting table preferences
The problem with the previous implementation was that the table's
$this->prefs can contain valid non-empty value in its default state -
the default column to sort by. On resetting, we must not throw away
these default prefs.

This patch simplifies the TABLE_VAR_RESET interpretation. If such an
HTTP parameter is passed via the request, the table simply behaves as if
there were no previously stored preferences (does not matter if coming
from the current session, or from the persistent cross-session storage).

The logic that decides on whether or not the reset widget should be
displayed is put into a new method can_be_reset() with unit tests
attached.

Finally, the previously private method render_reset_button() is now
protected and the reset widget is given a new semantic CSS class.
2015-11-04 15:07:17 +01:00
Adrian Greeve
b5987836fc MDL-51315 tablelib: Only display table preferences if necessary.
A thank you to Tony Butler for a solution to this issue.
2015-09-29 14:57:19 +08:00
John Okely
dd106c8824 MDL-37864 lib: Change help for headers to match existing table api 2015-08-11 12:18:21 +08:00
Marina Glancy
edbea936c5 MDL-37864 lib: corrections to help icon in tables 2015-08-11 12:18:21 +08:00