Page MenuHomePhabricator

add student-article hooks for gadgets that work with the Students table
Closed, DeclinedPublic

Description

We'd like to be able to hook .js gadgets into the course pages in useful ways, such as adding adding links for each article in the student table that provide filtered article histories with just the diffs for that student.

As Jeroen describes in an email: "Right now the table does not contain any easy-to-use data elements meant for usage by such scripts. I could add some. Alternatively the info could be added as a JSON blob in the page. Could also make the info available through an API module, which would allow scripts to use this info wherever they see fit.

Those options are basically ordered both from simple specific code to powerful general purpose code and from little work to implement to something that will take a few hours."

Ultimately, an API module seems like a very good idea. In the short term, though, adding some easy-to-use data elements that include the student-article linkages would probably be very helpful.

(I'll ask User:Writ Keeper, who is the script builder who prompted this, to comment.)


Version: master
Severity: enhancement

Details

Reference
bz44797

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:13 AM
bzimport set Reference to bz44797.
bzimport added a subscriber: Unknown Object (MLST).

writ.keeper.enwp wrote:

Hey, all. The script itself is based on User:Ale jrb's userhist script; it works directly from the article's history page and uses an API call to filter the entries by a selected user name. (I've made some modifications to the script, fixing a bug here or there and adding buttons to enable the loading of diffs in-place, rather than going to a separate page.) The script was already built by Ale jrb to accept a GET parameter ("isolate"), which, when present, automatically filters the history page by the given user name. Thus, in order to be accessed from a separate page, the URL requires two things: the target page for the standard "title" parameter, and the filtered user's name for the "isolate" parameter. The source for the script is at User:Writ Keeper/Scripts/userHistory.js; much of the code is unchanged from the original at [[User:Ale jrb/Scripts/userhist.js]]. Let me know if I can be of any help. Thanks!

At least in the current version of course pages (rather than a more general replacement that will be built later on) this is not going to be implemented.