hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Per Task Instruction not working when Albitrary geometry are involved #675

Open baditaflorin opened 9 years ago

baditaflorin commented 9 years ago

If you put a arbitrary polygon, the "Per task instruction" will not work

arbitrary bug If you put a normal grid, then it will work.

bug_not_present_in_grid

I need to correlate the osm files with the task_id in the osm tasking manager.

i changed one of the lines in "task.instructions.mako" from

.replace('{y}', str(task.y)) to .replace('{tasknum}', str(task.id))

But it`s still not working

baditaflorin commented 9 years ago

I managed to "hack" it around this using a modified version of the file . I will let the administrators to close the issue, because i think that this is not the desired behaviour.

% if task.cur_lock and task.cur_lock.lock and task.project.per_task_instructions:


${_('Extra Instructions')}

<% from osmtm.mako_filters import markdown_filter content = task.project.per_task_instructions if task.id: content = content.replace('{taskid}', str(task.id)) %>

${content | markdown_filter, n}

% endif

pgiraud commented 9 years ago

Hey, I don't think this is stupid at all. It would be nice to get this merged. The project id is also something that we want to expose. Are you able to provide a pull request?

baditaflorin commented 8 years ago

i don`t know how i would do that, and i just hacked the old file, ...

xivk commented 8 years ago

Would it be possible to add minlat, maxlat, minlon and maxlon to the parameters? This would allow us to create tasks loading data from external sources based on the bounding box.

Can this be done by just loading extra javascript via the 'extra instructions' field? Pointers welcome...