aboutsummaryrefslogtreecommitdiff
path: root/mod/tasklist
diff options
context:
space:
mode:
Diffstat (limited to 'mod/tasklist')
-rw-r--r--mod/tasklist/index.php72
-rw-r--r--mod/tasklist/start.php83
-rw-r--r--mod/tasklist/views/default/tasklist/item.php32
-rw-r--r--mod/tasklist/views/default/tasklist/main.php18
-rw-r--r--mod/tasklist/views/default/tasklist/newtask.php18
5 files changed, 0 insertions, 223 deletions
diff --git a/mod/tasklist/index.php b/mod/tasklist/index.php
deleted file mode 100644
index e21303638..000000000
--- a/mod/tasklist/index.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- require_once("../../engine/start.php");
-
- global $CONFIG;
- $_SESSION['id'] = 2;
-
- // Get the user
- $owner_id = page_owner();
- $owner = get_user(page_owner());
-
- $description = get_input("task");
- $status = get_input("status");
- $action = get_input("action");
- $guid = get_input("guid");
- $tags = get_input("tags");
-
- $limit = get_input("limit",10);
- $offset = get_input("offset",0);
-
- switch ($action)
- {
- case 'newtask' :
- $taskid = create_entity("object", "task", $owner_id, 0);
-
- if ($taskid)
- {
- $entity = get_entity($taskid);
-
- $entity->setMetaData('task', $task, 'text');
- $entity->setMetaData('status', 'notdone', 'text');
-
- if ($tags!="")
- {
- $tags = explode(",",$tags);
-
- foreach ($tags as $tag)
- {
- $tag = sanitise_string($tag);
- $entity->setMetaData($tag, $tag);
- }
- }
-
- $entity->save();
- } else echo "error";
-
- break;
-
- case 'tick' :
- $entity = get_entity($guid);
-
- $entity->setMetaData('status', 'done', 'text');
- break;
- }
-
- $body = elgg_view("tasklist/main", array(
- "name" => $owner->name,
- "tasklist" => tasklist_drawtasks($owner_id, $limit, $offset),
- "newtask" => tasklist_draw_newtask_form($owner_id)
- ));
- page_draw("Tasklist",$body);
-
-?> \ No newline at end of file
diff --git a/mod/tasklist/start.php b/mod/tasklist/start.php
deleted file mode 100644
index 720114238..000000000
--- a/mod/tasklist/start.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
- /**
- * Simple tasklist plugin
- *
- * These parameters are required for the event API, but we won't use them:
- *
- * @param unknown_type $event
- * @param unknown_type $object_type
- * @param unknown_type $object
- */
- function tasklist_init($event, $object_type, $object = null) {
-
- global $CONFIG;
-
- add_menu("Tasklist",$CONFIG->wwwroot . "mod/tasklist/",array(
- menu_item("The tasklist plugin",$CONFIG->wwwroot."mod/tasklist/"),
- ));
- }
-
- /**
- * The entity.
- *
- * @param ElggObject $entity
- */
- function tasklist_draw_task($entity)
- {
- // Get the status
- $status = $entity->getMetaData("status");
-
- // Task
- $task = $entity->getMetaData("task");
-
- // Render the item
- return elgg_view("tasklist/item", array(
- "owner_id" => $entity->owner_guid,
- "task" => $task,
- "status" => $status,
- "guid" => $entity->guid
- ));
- }
-
- function tasklist_drawtasks($ownerid, $offset = 0, $limit = 10)
- {
- // Get all entities of task
- //$entities = get_entities("object","task",$ownerid, "time_created desc", $limit, $offset);
- $entities = get_entities_from_metadata("status", "notdone", "object", "task", $limit, $offset);
-
- if (($entities) && (is_array($entities)))
- {
- $display = "<table>";
-
- foreach($entities as $e)
- $display .= tasklist_draw_task($e);
-
- $display .= "</table>";
-
- return $display;
- }
-
- return "No tasks present for user.";
- }
-
- function tasklist_draw_newtask_form($ownerid)
- {
- return elgg_view("tasklist/newtask", array(
- "owner_id" => $ownerid
- ));
- }
-
- // Make sure test_init is called on initialisation
- register_event_handler('init','system','tasklist_init');
-
-?> \ No newline at end of file
diff --git a/mod/tasklist/views/default/tasklist/item.php b/mod/tasklist/views/default/tasklist/item.php
deleted file mode 100644
index 009d30aa4..000000000
--- a/mod/tasklist/views/default/tasklist/item.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-?>
-<tr>
- <td><b><?php echo $vars['task'] ?></b></td>
-
- <td>
- <?php if ($vars['status']=='done')
- echo "done";
- else
- {
-?>
- <form method = "post">
- <input type="hidden" name="action" value="tick" />
- <input type="hidden" name="status" value="done" />
- <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>"/>
- <input type="hidden" name="guid" value="<?php echo $vars['guid']; ?>"/>
- <input type="submit" name="Done" value="Done" />
- </form>
-<?php
- }
-?>
- </td>
-</tr> \ No newline at end of file
diff --git a/mod/tasklist/views/default/tasklist/main.php b/mod/tasklist/views/default/tasklist/main.php
deleted file mode 100644
index b371339bf..000000000
--- a/mod/tasklist/views/default/tasklist/main.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-<h1><?php echo $vars['name'] ?>'s Tasklist</h1>
-<?php echo $vars['tasklist']; ?>
-
-<?php echo $vars['newtask']; ?>
-
-
diff --git a/mod/tasklist/views/default/tasklist/newtask.php b/mod/tasklist/views/default/tasklist/newtask.php
deleted file mode 100644
index 579e27e6d..000000000
--- a/mod/tasklist/views/default/tasklist/newtask.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
- /**
- * Elgg tasklist test
- *
- * @package ElggTasklist
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey <marcus@marcus-povey.co.uk>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-?>
-<form method="post">
- <textarea name="task"></textarea>
- <input type="text" name="tags" />
- <input type="hidden" name="action" value="newtask"/>
- <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>"/>
- <input type="submit" name="submit" />
-</form> \ No newline at end of file