Disable games in learnpathitem

skala
Julio Montoya 12 years ago
parent 54866b2069
commit 909a75a651
  1. 12
      main/newscorm/learnpathItem.class.php

@ -75,7 +75,7 @@ class learnpathItem {
public function __construct($id, $user_id = null, $course_id = null, $item_content = null) {
// Get items table.
if (!isset($user_id)) { $user_id = api_get_user_id(); }
if (self::debug > 0) { error_log('New LP - In learnpathItem constructor: '.$id.','.$user_id, 0); }
if (self::debug > 0) { error_log("New LP - In learnpathItem constructor: id: $id user_id: $user_id course_id: $course_id item_content: $item_content", 0); }
if (empty($course_id)) {
$course_id = api_get_course_int_id();
@ -85,7 +85,7 @@ class learnpathItem {
$items_table = Database::get_course_table(TABLE_LP_ITEM);
$this->course_id = api_get_course_int_id();
$id = (int) $id;
$id = intval($id);
if (empty($item_content)) {
$sql = "SELECT * FROM $items_table WHERE c_id = $course_id AND id = $id";
@ -122,7 +122,8 @@ class learnpathItem {
}
$this->save_on_close = true;
$this->db_id = $id;
$this->seriousgame_mode = $this->get_seriousgame_mode();
//$this->seriousgame_mode = $this->get_seriousgame_mode();
$this->seriousgame_mode = 0;
// Get search_did.
if (api_get_setting('search_enabled') == 'true') {
@ -138,8 +139,7 @@ class learnpathItem {
}
}
$this->audio = $row['audio'];
//error_log('New LP - End of learnpathItem constructor for item '.$id, 0);
if (self::debug > 0) error_log('New LP - End of learnpathItem constructor for item '.$id, 0);
return true;
}
@ -2664,6 +2664,4 @@ class learnpathItem {
$sql = "UPDATE $tbl_lp_item SET audio = '' WHERE c_id = $course_id AND id IN (".$this->db_id.")";
Database::query($sql);
}
}
Loading…
Cancel
Save