/**
  * displays the edit challenge form
  */
 public function actionEdit()
 {
     IzapBase::gatekeeper();
     $challenge_entity = get_entity($this->url_vars[2]);
     if (!$challenge_entity->canEdit()) {
         forward(REFERER);
     }
     $this->page_elements['filter'] = '';
     $this->page_elements['title'] = elgg_echo('izap-contest:challenge:edit');
     $this->page_elements['content'] = elgg_view('forms/challenge/new_edit', array('challenge_entity' => $challenge_entity));
     $this->drawPage();
 }
 /**
  * displays the Edit quiz form
  */
 public function actionEdit()
 {
     IzapBase::gatekeeper();
     $quiz = get_entity($this->url_vars[3]);
     if (!$quiz->canEdit()) {
         forward(REFERER);
     }
     $container_challenge = get_entity($this->url_vars[2]);
     $type = get_input('type');
     elgg_set_page_owner_guid($container_challenge->container_guid);
     $this->page_elements['filter'] = '';
     $this->page_elements['title'] = '<a href="' . $container_challenge->getURL() . '">' . $container_challenge->title . '</a>' . elgg_echo('izap-contest:quiz:edit');
     $this->page_elements['page_title'] = $container_challenge->getURL() . $container_challenge->title . elgg_echo('izap-contest:quiz:edit');
     $this->page_elements['content'] = elgg_view('forms/quiz/new_edit', array('container_guid' => $this->url_vars[2], 'mtype' => $type, 'quiz_entity' => $quiz));
     $this->drawPage();
 }
Exemple #3
0
<?php

/* * *************************************************
 * PluginLotto.com                                 *
 * Copyrights (c) 2005-2011. iZAP                  *
 * All rights reserved                             *
 * **************************************************
 * @author iZAP Team "<*****@*****.**>"
 * @link http://www.izap.in/
 * Under this agreement, No one has rights to sell this script further.
 * For more information. Contact "Tarun Jangra<*****@*****.**>"
 * For discussion about corresponding plugins, visit http://www.pluginlotto.com/forum/
 * Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
 */
// here the request to accept the challenge is being send to the friend
IzapBase::gatekeeper();
$friends = get_input('friend');
$challenge = new IzapChallenge(get_input('challenge_guid'));
if (sizeof($friends)) {
    $challenge->inviteFriends($friends);
}
forward(REFERER);