Minor - format code.

1.9.x
Julio Montoya 11 years ago
parent ef5ede298c
commit 8c31b07e62
  1. 10
      main/coursecopy/classes/Course.class.php
  2. 4
      main/document/document.inc.php
  3. 2
      main/document/document.php

@ -22,7 +22,7 @@ class Course
/**
* Create a new Course-object
*/
function __construct()
public function __construct()
{
$this->resources = array();
$this->code = '';
@ -94,14 +94,12 @@ class Course
*/
public function get_sample_text()
{
$sample_text = '';
foreach ($this->resources as $type => & $resources) {
if (count($resources) > 0) {
foreach ($resources as $id => & $resource) {
$title = '';
$description = '';
switch ($type) {
case RESOURCE_ANNOUNCEMENT:
$title = $resource->title;
@ -214,8 +212,8 @@ class Course
/**
* Converts to the system encoding all the language-sensitive fields in the imported course.
*/
public function to_system_encoding() {
public function to_system_encoding()
{
if (api_equal_encodings($this->encoding, api_get_system_encoding())) {
return;
}
@ -223,9 +221,7 @@ class Course
foreach ($this->resources as $type => & $resources) {
if (count($resources) > 0) {
foreach ($resources as $id => & $resource) {
switch ($type) {
case RESOURCE_ANNOUNCEMENT:
$resource->title = api_to_system_encoding($resource->title, $this->encoding);
$resource->content = api_to_system_encoding($resource->content, $this->encoding);

@ -557,7 +557,7 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
}
}
//Move button
// Move button.
if ($is_certificate_mode || in_array($path, DocumentManager::get_system_folders())) {
$modify_icons .= '&nbsp;' . Display::return_icon('move_na.png', get_lang('Move'), array(), ICON_SIZE_SMALL) . '</a>';
} else {
@ -586,7 +586,7 @@ function build_edit_icons($document_data, $id, $is_template, $is_read_only = 0,
}
}
//Delete button
// Delete button
if (in_array($path, DocumentManager::get_system_folders())) {
$modify_icons .= '&nbsp;' . Display::return_icon('delete_na.png', get_lang('ThisFolderCannotBeDeleted'), array(), ICON_SIZE_SMALL);
} else {

@ -531,7 +531,7 @@ if (!empty($docs_and_folders)) {
if ($file['filetype'] == 'file') {
$path_info = pathinfo($file['path']);
$extension = strtolower($path_info['extension']);
//@todo use a js loop to autogenerate this code
//@todo use a js loop to auto generate this code
if (in_array($extension, array('ogg', 'mp3', 'wav'))) {
// Get the document data from the ID
$document_data = DocumentManager::get_document_data_by_id($file['id'], api_get_course_id(), false, $session_id);

Loading…
Cancel
Save