157 Commits

Author SHA1 Message Date
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
Sergey Rozhkov
3fed76e4df MDL-37864 lib: Help icon work correctly in table header with sorting 2015-08-11 12:18:20 +08:00
Tony Butler
bf7c844e94 MDL-49582 core_lib: Add button to allow user to reset table preferences 2015-07-16 11:39:25 +01:00
Dan Poltawski
62d94d17d0 Revert "Merge branch 'MDL-37864' of https://github.com/serega1394/moodle"
This reverts commit 19ffcbe273171ea9e2d3f0974e99de2ea10c2d7e, reversing
changes made to 2112dd44e87092d5b760e7c4f91db3cdd8fb1c35.
2015-04-02 11:05:45 +02:00
Sergey Rozhkov
f1e1477142 MDL-37864 lib: Help icon work correctly in table header with sorting 2015-03-29 22:47:55 +03:00
Tony Butler
f5ba1b93a2 MDL-45725 core_lib: Save user preferences for flexible tables 2015-03-16 10:41:11 +00:00
David Monllao
1cfce08e63 MDL-48595 logstore: Adding new interfaces
sql_reader and sql_internal_table_reader.
2015-03-09 08:25:37 +08:00
Frederic Massart
ba55be9151 MDL-43902 output: Final deprecation of classes r0/r1 in table rows 2014-12-09 14:52:30 +08:00
Adrian Greeve
143aacaea0 MDL-46921 lib: Add sorting on additional name fields
A thank you to Yishe Choden for creating a patch for this issue.
2014-10-09 08:07:44 +08:00
James Pratt
ac3e5ed7ba MDL-41755 tablelib : added a function to add multiple rows at once 2014-02-14 14:13:02 +07:00
Sam Hemelryk
72d953e19e Merge branch 'MDL-44059-master' of git://github.com/ankitagarwal/moodle 2014-02-10 15:58:36 +13:00
Ankit Agarwal
807241b991 MDL-44059 libraries: Add a method to return html for row instead of just printing it 2014-02-10 10:44:20 +08:00