124 Commits

Author SHA1 Message Date
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
Sam Hemelryk
179ddd105b Merge branch 'MDL-43804-master' of git://github.com/ankitagarwal/moodle
Conflicts:
	theme/bootstrapbase/style/moodle.css
2014-02-10 08:50:23 +13:00
Gordon Bateson
1b17f2b0db MDL-40410 remove ampersands required for PHP strict standards lib/tablelib.php 2014-02-04 10:06:07 +13:00
Ankit Agarwal
6b21643236 MDL-43804 themes: Update css not to use r0 and r1 identifiers for table rows 2014-02-03 14:29:39 +08:00
Tim Hunt
94ffbef19a MDL-40481 quiz responses report needs cols need text_sorting 2013-11-05 14:13:53 +00:00
Damyon Wiese
3e22717283 MDL-42112 tablelib: Generate the correct number of cols for empty rows
(And a test for it).
2013-10-18 11:51:55 +08:00
Damyon Wiese
fdf70473a5 MDL-36011 tablelib: Make column headers expand/collapse links accessible. 2013-08-02 11:24:53 +08:00
Tim Hunt
60bfa04693 MDL-40480 tablelib: specify charset in XHMTL downloads.
Thanks to Jürgen Zimmer for the suggestion.
2013-07-19 12:05:39 +01:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Damyon Wiese
d495f2d75e MDL-30700 tablelib: Fixed get_sort_for_table to work with text sorting columns for oracle
This change stores the list of columns that require text sorting in the session,
so the static function "get_sort_for_table" can work without any additional parameters.
2012-12-13 09:58:07 +08:00
Damyon Wiese
1e4bd9fe25 MDL-30700 Assignment 2.2: Added text_sorting function to tablelib
Allows oracle to sort by text (clob) columns (should be used sparingly).
2012-12-11 15:42:24 +08:00
Tim Hunt
bf4045599c MDL-36845 excel export: don't output invalid sheet names.
We should clean any proposed worksheet name, to remove the characters
that Excel does not allow.
2012-11-30 15:58:36 +00:00
Frederic Massart
06b7ed0a45 MDL-36415 usability: Use new up/down and ordering icons 2012-11-16 12:47:09 +08:00
Tim Hunt
4726ad4fa4 MDL-36103 tablelib: links to user profiles are wrong in courses. 2012-10-19 16:49:34 +08:00
Damyon Wiese
f9e6212700 MDL-35375: Ensure the assignment grading table is always sorted by at least one unique column 2012-09-19 12:56:51 +08:00
Rajesh Taneja
0465ef6e31 MDL-34568: Accessibility: Added missing lables in quiz section
AMOS BEGIN
 CPY [pluginname,grade_export_xls],[downloadexcel,table]
 CPY [pluginname,grade_export_ods],[downloadods,table]
AMOS END
2012-09-07 10:18:15 +08:00
Rajesh Taneja
4625404451 MDL-34293 Themes: Added tbody to flexible table 2012-08-21 13:50:38 +08:00
David Scotson
289320528c MDL-34293 Themes: Added thead to flexible table 2012-08-17 14:50:20 +08:00
Sam Hemelryk
6869060218 Merge branch 'wip-MDL-34074-master' of git://github.com/abgreeve/moodle 2012-08-06 13:36:44 +12:00
Adrian Greeve
9a5abd1b70 MDL-34074 - lib - Creation of a csv upload class which is FRC 4180 compliant and the alteration of various files around Moodle to use this class. 2012-08-02 13:18:57 +08:00
Rossiani Wijaya
ecc5cc31ae MDL-34650 - accessibility compliance: Add <label> for form input text and select tag 2012-07-31 12:07:16 +08:00
Marina Glancy
2ea47082f0 MDL-33479 removed legacy constructor causing strict notice in php5 2012-06-05 09:27:32 +08:00
Petr Skoda
7e41a08d7a MDL-32512 remove deprecated table_sql constructor breaking E_STRICT 2012-04-21 11:26:14 +02:00
Sam Hemelryk
3211569a6a Revert "MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag"
This reverts commit f9f281b8fee75c2416d71bae7583fd026b9ccabb.
2012-04-11 17:18:58 +12:00
Rossiani Wijaya
f9f281b8fe MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag 2012-03-30 16:26:58 +08:00
Sam Hemelryk
8b05c5e2bd MDL-27962 Fixed typo in tablelib preventing columns from being collapsed 2011-06-23 13:33:28 +08:00
Tim Hunt
d8a3b87c0e MDL-27340 tablelib.php fix a notice when is false. 2011-05-01 17:36:19 +01:00
Eloy Lafuente (stronk7)
11a6763546 MDL-26425 tablelib - fix tr class typo (detected @ MDL-27034) 2011-04-06 10:58:39 +02:00
Tim Hunt
71811083ba MDL-27035 table_sql forgets to set countparams. 2011-03-30 20:25:43 +01:00
Tim Hunt
ba9164e575 MDL-26425 tablelib more cleanup, mostly to PHPdocs, following sam's comments. 2011-03-27 20:06:45 +01:00
Tim Hunt
76dc1e2527 MDL-26425 tablelib use html_writer when outputting rows and headers.
This includes refactoring to extract methods like sort_icon and show_hide_link which I think makes the code easier to read.

Note also the change to make_styles_string that makes it usable with html_writer. (Perhpas we need a css_writer classe ;-))
2011-03-27 20:06:44 +01:00
Tim Hunt
6f0d3480c7 MDL-26425 tablelib change print_initials_bar to remove duplication, and to use html_writer. 2011-03-27 20:06:44 +01:00
Tim Hunt
b08fb128c8 MDL-26425 tablelib ability for table_sql to add a class to the row based on the data. 2011-03-27 20:06:43 +01:00
Tim Hunt
abf72969a4 MDL-26425 tablelib change col_username to use html_writer and moodle_url. 2011-03-27 20:06:43 +01:00