Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  plugin version
  [FIX] fixed copy part II
  [FIX] disabling copy
  commented out js
  • Loading branch information
chfsx committed May 17, 2016
2 parents 88898d2 + f5c7225 commit 29ea9c8
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 8 deletions.
14 changes: 14 additions & 0 deletions classes/Pin/class.xlvoPin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ class xlvoPin {
protected $pin_length = 4;


/**
* @param $obj_id
* @return int
*/
public static function lookupPin($obj_id) {
/**
* @var $xlvoVotingConfig xlvoVotingConfig
*/
$xlvoVotingConfig = xlvoVotingConfig::findOrGetInstance($obj_id);

return $xlvoVotingConfig->getPin();
}


/**
* @param $pin
* @return int
Expand Down
40 changes: 33 additions & 7 deletions classes/class.ilObjLiveVotingListGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
+-----------------------------------------------------------------------------+
*/

include_once "./Services/Repository/classes/class.ilObjectPluginListGUI.php";
require_once('./Services/Repository/classes/class.ilObjectPluginListGUI.php');
require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/classes/QuestionTypes/class.xlvoQuestionTypes.php');
require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/classes/Pin/class.xlvoPin.php');
require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/classes/Voter/class.xlvoVoter.php');
require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/classes/Player/class.xlvoPlayer.php');

/**
* ListGUI implementation for LiveVoting object plugin. This one
Expand All @@ -38,24 +41,35 @@ class ilObjLiveVotingListGUI extends ilObjectPluginListGUI {
/**
* Init type
*/
function initType() {
public function initType() {
$this->setType("xlvo");
$this->copy_enabled = true;
$this->copy_enabled = false;
}


/**
* @param $a_status
* @return bool
*/
public function enableCopy($a_status) {
$this->copy_enabled = false;

return false;
}


/**
* Get name of gui class handling the commands
*/
function getGuiClass() {
public function getGuiClass() {
return "ilObjLiveVotingGUI";
}


/**
* Get commands
*/
function initCommands() {
public function initCommands() {
return array(
array(
"permission" => "read",
Expand Down Expand Up @@ -93,10 +107,22 @@ public function getCommandFrame($a_cmd) {
* "property" (string) => property name
* "value" (string) => property value
*/
function getProperties() {
public function getProperties() {
$props = array();

$this->plugin->includeClass("class.ilObjLiveVotingAccess.php");
// $props[] = array(
// "alert" => false,
// "property" => 'Online',
// "value" => xlvoVoter::count(xlvoPlayer::getInstanceForObjId($this->obj_id)),
// );
//
// $props[] = array(
// "alert" => false,
// "property" => 'PIN',
// "value" => xlvoPin::lookupPin($this->obj_id),
// );

require_once('./Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/classes/class.ilObjLiveVotingAccess.php');
if (!ilObjLiveVotingAccess::checkOnline($this->obj_id)) {
$props[] = array(
"alert" => true,
Expand Down
4 changes: 4 additions & 0 deletions js/Player/xlvoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ var xlvoPlayer = {
xlvoPlayer.counter++;
if ((xlvoPlayer.counter > xlvoPlayer.forced_update_interval) || (data.player.last_update != xlvoPlayer.player.last_update) || (data.player.show_results != xlvoPlayer.player.show_results) || (data.player.status != xlvoPlayer.player.status) || (data.player.active_voting_id != xlvoPlayer.player.active_voting_id)) {
$('#xlvo-display-player').html(data.player_html);

// var player = document.getElementById('xlvo-display-player');
// player.innerHTML = (data.player_html);

xlvoPlayer.counter = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$id = 'xlvo';
$version = '3.0.3';
$version = '3.0.4';
$ilias_min_version = '5.0.0';
$ilias_max_version = '5.1.999';
$responsible = 'studer + raimann ag';
Expand Down

0 comments on commit 29ea9c8

Please sign in to comment.