OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



New Schedule Design - Pre-Dev Feedback Please!

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page. While these are OJS-specific, the OCS codebase is similar enough to OJS they should be of help. There is also an [url=http://pkp.sfu.ca/ocs_documentation[/url]OCS Documentation[/url] page with some more general documentation that might also be of interest.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a technical support question, try the OCS Technical Support subforum.

New Schedule Design - Pre-Dev Feedback Please!

Postby Idealien » Sun Jan 19, 2014 8:52 am

Hello,

I am supporting a client OCS site hosted with PKP primariily on the design / development side of things. One area where they have found a challenge / gap with OCS is the schedule. They have a few requirements that in talking with James are above and beyond what OCS currently has implemented or he had any examples to share:
  • Ability to search and sort in a calendar or table view
  • Ability for attendees to indicate which presentations they plan to attend
  • Let them modify and see on local PC and mobile devices
  • Look reasonable when printing
  • 1 Presentation can / must include more than 1 paper

My first iteration used datatables.net (download/file.php?mode=view&id=1107) but did not handle the latter requirements very well. In fact the detail that OCS is meant 1:1 paper to presentation was not discovered until this week. So I've gone back to square one and designed up a more ambitious schedule interface and am about to start developing this week.

Due to some of the time constraints and functionality, this version is going to pull the schedule data as JSON on the page using traditional templates, but rest of functionality separate. I'm still working out the finer details of how we can use Submission Types to connect papers into grouped presentations, but the rest of it will be built via:

  • Backbone.js to provide MVC setup to treat it all as a single page application
  • Boostrap CSS to provide easy markup structure and tweaks.
  • PHP Slim for REST web services. Likely to separate DB both for dev efficiency and because registration for site was with external payment setup. If future versions of OCS support would happily sync this back into base DB.

Attached are 3 mock-ups of some of the screens I'm proposing to build:

Search By Presentation - download/file.php?mode=view&id=1108
Includes option to filter by panel and author.
The main screen users would scroll through to add presentations to their itinerary

Search By Author - download/file.php?mode=view&id=1109
Shows which presentation their paper(s) are included in and where / when.
Would also allow people to add to their itinerary

View Itinerary
Still working through the options, but likely a compact and detailed view of presentations. Possibly a standard 3-day wide table / grid mode if the presentation titles are short or have acronymns.

The other pages to create along with these:

Search By Panel (Track in traditional OCS language)
Filter similar to author showing presentations in full

Search By Paper
Alphabetic search filters with output closer to author structure

Search By Date / Time
This would help people fill in gaps in their schedule if after selecting their preferences and/or make quick changes to know alternates happening in same time slots.

Search By Location
Presentations based on building.
This would be the last to add if needed.

Anywhere that there is a location, date/time, author, panel, etc they would all be linked over to their appropriate search screen.

If anyone has any feedback, comments or, particularly, things that I should be aware of towards the following it would be quite appreciated.
Attachments
ByAuthor.png
Mockup - Search By Author View
ByAuthor.png (295.47 KiB) Viewed 4848 times
Presentation.png
Mockup - Presentation View
Presentation.png (479.14 KiB) Viewed 4848 times
OCS_Schedue_Initial.jpg
Initial schedule with datatables.net
OCS_Schedue_Initial.jpg (247.7 KiB) Viewed 4848 times
Idealien
 
Posts: 4
Joined: Sun Jan 19, 2014 8:04 am

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby Idealien » Mon Jan 20, 2014 5:25 am

This version is going to pull the schedule data as JSON on the page using traditional templates, but rest of functionality separate. I'm still working out the finer details of how we can use Submission Types to connect papers into grouped presentations


I have been able to modify /index.php/irspm2014/IRSPM2014/schedConf/schedule (from templates/schedConf/schedules/expanded.tpl) to include the selected submission type index with {$item->getData('sessionType')}

However I'm having some difficulty pulling a separate list of all submission types + description into the same page.

The population of the dropdown list of session types in /ocs/templates/trackDirector/submission/management.tpl at lines 75 - 89 has a loop condition that is a good example I believe. However trying to integrate that back to the expanded.tpl has not been successful thus far. I believe there are pieces in its' handler that must be brought into /pages/schedConf/SchedConfHandler.inc.php in order to generate results, but I have not been able to identify all the pieces required.

Thus far I have added the following into /pages/schedConf/SchedConfHandler.inc.php

Code: Select all
import('controlledVocab.ControlledVocabDAO');
$controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
$templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('sessionTypes', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));


and in expanded.tpl {$sessionTypes|@debug_print_var} will print an Array but no contents of it.

Help would be appreciated in narrowing down what is required in order to have a complete list of submission types able to present in that template.

And/or - If it were to present through an entirely separate page, what would be required? The static pages plugin delivers all output based on /plugins/generic/staticPages/content.tpl template that seems to have less of the data accessible.
Idealien
 
Posts: 4
Joined: Sun Jan 19, 2014 8:04 am

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby asmecher » Mon Jan 20, 2014 6:11 am

Hi Idealien,

Your code looks OK to me; rather than using debug_print_var, just try a sample for loop, e.g.:
Code: Select all
{foreach from=$myArrayVariable key=keyVariableName item=valueVariableName}
    {$keyVariableName|escape} => {$valueVariableName|escape}<br/>
{/foreach}
As you've noted, the controller code needs to match the view code -- e.g. variables for display will need to be assigned to the templates on the PHP side. If you were to base something off the static pages plugin, you'd put the assignments in that code in order to have the variables exposed in the corresponding .tpl file.

Looks like excellent work so far!

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
Joined: Wed Aug 10, 2005 12:56 pm

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby Idealien » Tue Jan 21, 2014 1:03 pm

Thanks Alec,

I had missed a subtle difference in the controller code so I am now generating the session types out to page. Successful with:

Added to /pages/SchedConf/SchedConfHandler.inc.php
Code: Select all
import('controlledVocab.ControlledVocabDAO');
$controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
$templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('paperType', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));


Added to /templates/schedConf/schedules/expanded.tpl
Code: Select all
{foreach from=$sessionTypes key=keyVariableName item=valueVariableName}
    {$keyVariableName|escape} => {$valueVariableName|escape}<br/>
{/foreach}


Wondering if you have any thoughts / recommendations around the notion of scheduling session types as "presentations" instead of scheduling posted papers. I think that would involve modifications to the schedule presentation and events page which currently lists all currently posted papers where location / date can be specified.

The schedule template page would then have the following to create JSON for the presentation layer to work with:

  • Loop of papers, no schedule info, that has a session type ID as single column along with panel ID, author, meta data, abstract.
  • Loop of session Types with title, description, ID
  • Loop of "scheduled session types" that have location and date / time.
  • Loop of tracks for ID, full title + description and probably track directors

If that works out, it means that the only net new data (possibly stored outside of OCS) would be attendees indicating their planned itinerary.

Are there any examples of web services built into OCS? Or for a non-AJAX implementation anywhere that attendee preferences are stored into the database? The reason I ask is that it is easy enough to separate the presentation layer elements of what I've come up with (based on Bootstrap) from the dynamic interface elements (Backbone.js) and web service elements I would have to build IF there isn't any strong foundation for that to be captured into the OCS/OCS platform currently.

Thanks,
Jamie
Idealien
 
Posts: 4
Joined: Sun Jan 19, 2014 8:04 am

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby asmecher » Wed Jan 22, 2014 8:29 am

Hi Jamie,

Hmm, tinkering with the scheduler risks getting quite involved. Have you looked at scheduling using special events? It might provide a low-code-impact workaround. Alternatively, I recall that it was possible to schedule multiple events for the same time block -- though my recollection might be incorrect. If not, it would probably be a low-impact modification.

As for AJAX, the current release of OCS doesn't include any. We're currently working on OJS 3.0, which will bring it up to the newer generation of software pioneered in OMP 1.0; when this is done, it will leave two of our applications (OHS and OCS) at the older generational level. At that point we'll decide how and when to bring OCS up to a modern standard, but we don't have concrete plans to share yet. Meanwhile, page handlers can serve up JSON without problems; there are no examples of that in the OCS codebase, but if you'd like more information, I can write something up.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
Joined: Wed Aug 10, 2005 12:56 pm

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby Idealien » Sun Jan 26, 2014 6:42 pm

asmecher wrote:Hmm, tinkering with the scheduler risks getting quite involved. Have you looked at scheduling using special events? It might provide a low-code-impact workaround.


I now have, but it seems that without a fix for location assignment of special events (http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3441) it won't make things any better for scale of dev.

asmecher wrote:Alternatively, I recall that it was possible to schedule multiple events for the same time block -- though my recollection might be incorrect. If not, it would probably be a low-impact modification.


Yes - that is possible.

asmecher wrote:Meanwhile, page handlers can serve up JSON without problems; there are no examples of that in the OCS codebase, but if you'd like more information, I can write something up.


That would be very appreciated. if you could put together an example that provides any / as much of the following into JSON that would be appreciated.

[Paper] (Array)
=> ID
=> Title
=> Paper URL
=> Paper Link To Download Gallery File
=> Authors (Array)
=> ID
=> Affiliation
=> Country
=> Session Type ID
=> Panel
=> Date
=> Start Time
=> End Time
=> Building
=> Room
=> Abstract

[Session Type]
=> ID
=> Description

[Author]
=> AuthorID
=> Author Name
=> Affiliation
=> Country

[Panel]
=> ID
=> Description

The majority of the paper elements are currently captured into /templates/schedConf/schedules/expanded.tpl on the sppa_dev environment if you want to start from or push the example into that environment. In theory I believe I can do an additional set of loops to create a JSON array that provides "multiple paper presentation" that has ID, date, start time, end time, building and room based on first paper to use a session type ID.

I suspect that for a the sppa conference that has 496 papers pulling back what I describe below into a single page load will probably be rather large (hence the AJAX), but to flush out the rest of the proof of concept elements on the design side having that as in page JSON or one that I can call as a series of jQuery AJAX requests would be a huge level up in this process. Then only the itinerary and user details might need to be managed via external web service.

Thanks,
Jamie
Idealien
 
Posts: 4
Joined: Sun Jan 19, 2014 8:04 am

Re: New Schedule Design - Pre-Dev Feedback Please!

Postby asmecher » Tue Jan 28, 2014 7:42 am

Hi Jamie,

For the mechanism of JSON delivery via OCS, the closest existing example in that codebase (admittedly not all that close) is the "suggest username" button -- this is not JSON, but simply an asynchronous request in plaintext. The server side is implemented in pages/manager/PeopleHandler.inc.php and the client side is implemented in templates/manager/people/userProfileForm.tpl.

To make something like this use JSON you'd need to use json_encode on the server side, and something like https://github.com/douglascrockford/JSON-js on the client side.

As for the specific schedule view, I would suggest formatting the data into JSON directly in PHP and not using the Smarty template at all for this purpose. To do that, you'll need to add a third mode to the schedule function in pages/schedConf/SchedConfHandler.inc.php that serves up JSON. You can format all the objects already fetched for the Smarty template into JSON instead; I think everything you require should be available there.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
Joined: Wed Aug 10, 2005 12:56 pm


Return to OCS Development

Who is online

Users browsing this forum: No registered users and 1 guest