public function executeUpdateItems(\Library\HttpRequest $rq)
 {
     $result = $this->InitResponseWS();
     // Init result
     $rows_affected = 0;
     //Get the task objects from ids received
     $task_ids = str_getcsv($this->dataPost["task_ids"], ',');
     $sessionTasks = \Applications\PMTool\Helpers\TaskHelper::GetSessionTasks($this->app()->user());
     $sessionProject = \Applications\PMTool\Helpers\ProjectHelper::GetCurrentSessionProject($this->app()->user());
     foreach ($task_ids as $id) {
         $sessionTask = $sessionTasks[\Library\Enums\SessionKeys::TaskKey . $id];
         $task = $sessionTask[\Library\Enums\SessionKeys::TaskObj];
         $task->setTask_active($this->dataPost["action"] === "active" ? TRUE : FALSE);
         $task_activated = $task->task_activated();
         //check if task is already not activated and mark accordingly
         if ($task_activated === '0' or is_null($task_activated)) {
             $task->setTask_activated('1');
         }
         $manager = $this->managers->getManagerOf($this->module);
         $rows_affected += $manager->edit($task, "task_id") ? 1 : 0;
         //Create Location specific PDFs for this task
         //Also check if task is already activated earlier, if so we don't want file copy feature again
         if (($task_activated === '0' or is_null($task_activated)) && $this->dataPost["action"] === "active" && $rows_affected > 0) {
             \Applications\PMTool\Helpers\TaskHelper::CreateLocationSpecificPDF($sessionTask, $this);
         }
     }
     \Applications\PMTool\Helpers\TaskHelper::SetSessionTasks($this->app()->user(), $sessionTasks);
     $this->SendResponseWS($result, array("resx_file" => \Applications\PMTool\Resources\Enums\ResxFileNameKeys::Task, "resx_key" => $this->action(), "step" => $rows_affected === count($task_ids) ? "success" : "error"));
 }