AJAX (partial) table transclusion in the wiki

4 views
Skip to first unread message

Jim Tittsler

unread,
Jul 31, 2015, 6:11:40 AM7/31/15
to wikieducator-tech
I am EXPERIMENTING with a widget that allows AJAX-style inclusion of a table pulled from one page of the wiki and displayed on another page, optionally with certain columns hidden.

For example, the table on:
has gotten quite wide. I've displayed an abbreviated version on:

It is quite fragile at the moment in requiring column numbers to hide. It probably should read column headings. And working at the AJAX/browser level, it won't work with the Book/Collection extension.

I expected to write a lot of these sorts of widgets for filtering big tables of data on WikiResearcher, but the need never presented itself. You can imagine how this might be extended to also filter rows (based on number, value(s), styling, etc.) forming a VERY crude query of a data table.

An alternative widget might work on a table within a page, but then the user interface for showing/hiding columns needs careful consideration because I would expect different styles for different use cases. Pulling a particular rendering of a table into a new page allowed me to punt on those UI considerations for now.

This is all highly experimental and should be expected to change or perhaps even disappear. Feedback welcome. Your mileage my vary. No warranty expressed or implied.

--
Jim Tittsler                 Tokyo
 http://OERfoundation.org/
 http://OERu.org/

Wayne Mackintosh

unread,
Jul 31, 2015, 7:05:59 AM7/31/15
to wikieduc...@googlegroups.com

Jim

Wow. This is pretty cool. It's going to help us a lot in displaying redacted information for different purposes for the OERu.

So it would also be possible to filter out rows that don't meet a specified criterion or criteria?

Wayne Mackintosh (Mobile)
OER Foundation / OERu

--
You received this message because you are subscribed to the Google Groups "WikiEducator Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wikieducator-t...@googlegroups.com.
To post to this group, send email to wikieduc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wikieducator-tech.
For more options, visit https://groups.google.com/d/optout.

Luis Miguel Morillas

unread,
Jul 31, 2015, 7:33:59 AM7/31/15
to wikieducator-tech
This is very interesting, Jim

In order to reuse info, I'm testing Cargo extensión[1] on other wikis.
It's very powerful because it uses templates to structure data and you
can recover the info easy. For example, you can show all the
objectives of a course, a list of activities, etc.


[1] https://www.mediawiki.org/wiki/Extension:Cargo

Saludos,

-- luismiguel (@lmorillas)

Jim Tittsler

unread,
Jul 31, 2015, 8:44:21 AM7/31/15
to wikieducator-tech
On Fri, Jul 31, 2015 at 8:33 PM, Luis Miguel Morillas
<mori...@gmail.com> wrote:
>
> In order to reuse info, I'm testing Cargo extensión[1] on other wikis.
> It's very powerful because it uses templates to structure data and you

Thanks for the pointer. That does look very interesting.

I rather like how transparent it is to keep the data in a wikitext
table, but using Cargo and a database table would definitely be handy
for "real" data. I'll have to play with it a bit.

Jim

Jim Tittsler

unread,
Jul 31, 2015, 9:12:30 AM7/31/15
to wikieducator-tech
On Fri, Jul 31, 2015 at 8:05 PM, Wayne Mackintosh
<mackinto...@gmail.com> wrote:
> So it would also be possible to filter out rows that don't meet a specified
> criterion or criteria?

I think the hard part will be figuring out how to specify the criteria
in a way that:
- is flexible
- is easy to parse & secure
- doesn't require understanding regular expressions ;-)

Luis Miguel Morillas

unread,
Jul 31, 2015, 5:49:18 PM7/31/15
to wikieducator-tech
I'm using Cargo in a project some months ago an it gives a lot of
structure to de data. The project is yet in an alpha release, but it's
working fine for now. [1] [2]

[1] http://area47mil.educa.aragon.es/wiki/P%C3%A1gina_principal
[2] http://area47mil.educa.aragon.es/wiki/Centro:CEIP_ALTO_ARAG%C3%93N

Saludos,

-- luismiguel (@lmorillas)

Jim Tittsler

unread,
Aug 1, 2015, 1:44:06 AM8/1/15
to wikieducator-tech
On Fri, Jul 31, 2015 at 10:12 PM, Jim Tittsler <j...@oerfoundation.org> wrote:
> On Fri, Jul 31, 2015 at 8:05 PM, Wayne Mackintosh
> <mackinto...@gmail.com> wrote:
>> So it would also be possible to filter out rows that don't meet a specified
>> criterion or criteria?
>
> I think the hard part will be figuring out how to specify the criteria
> in a way that:

OK, Widget:DisplayTable now has simple row filtering. The filter
condition specifies rows to show (rather than rows to filter out). The
only condition implemented to date is "cell contains given substring
(case-insensitive)", but you can have multiple conditions. That allows
showing rows that have "100%" and rows that have "completed" in a
particular column of a row, because humans are hopeless at
consistency. (And note that the cell(s) being used for filtering do
not have to be displayed, as one of the examples below shows.)

http://WikiEducator.org/User:JimTittsler/DisplayTable shows a
rendering of the table with just the 1st and 2nd year courses, and
another rendering of the "100%" and "completed" courses of any level.

Jim

P.S. Known bug: the first column of the header is sometimes shown when
it isn't desired.

Wayne Mackintosh

unread,
Aug 1, 2015, 2:56:37 AM8/1/15
to wikieduc...@googlegroups.com
Jim,

Thanks - Having this row filter feature to specify rows to show is a VERY useful addition to Widget:DisplayTable.

Appreciate your weekend Hacking to help OERu (and others) achieve more sustainable education futures.

W

--
You received this message because you are subscribed to the Google Groups "WikiEducator Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wikieducator-t...@googlegroups.com.
To post to this group, send email to wikieduc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wikieducator-tech.
For more options, visit https://groups.google.com/d/optout.



--
Wayne Mackintosh
Director OER Foundation and OERu facilitator
Skype: WGMNZ1
Twitter: Mackiwg
Reply all
Reply to author
Forward
0 new messages