Skip to content

Commit 537ed6b

Browse files
committed
Minor - format code, remove unused code/comments
1 parent 28edb98 commit 537ed6b

File tree

6 files changed

+21
-47
lines changed

6 files changed

+21
-47
lines changed

main/lp/lp_ajax_initialize.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,14 @@ function initialize_item($lp_id, $user_id, $view_id, $next_item)
137137
* -lms_view_id
138138
* -lms_user_id
139139
*/
140-
$mytotal = $mylp->getTotalItemsCountWithoutDirs();
141-
$mycomplete = $mylp->get_complete_items_count();
142-
$myprogress_mode = $mylp->get_progress_bar_mode();
143-
$myprogress_mode = ($myprogress_mode == '' ? '%' : $myprogress_mode);
144140
$mynext = $mylp->get_next_item_id();
145141
$myprevious = $mylp->get_previous_item_id();
146142
$myitemtype = $mylpi->get_type();
147143
$mylesson_mode = $mylpi->get_lesson_mode();
148144
$mycredit = $mylpi->get_credit();
149145
$mylaunch_data = $mylpi->get_launch_data();
150146
$myinteractions_count = $mylpi->get_interactions_count();
151-
$myobjectives_count = $mylpi->get_objectives_count();
152147
$mycore_exit = $mylpi->get_core_exit();
153-
154148
$return .=
155149
"olms.lms_lp_id=".$lp_id.";".
156150
"olms.lms_item_id=".$next_item.";".

main/lp/openoffice_text_document.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ public function dealPerPage($header, $body)
207207
$_course = api_get_course_info();
208208
// Split document to pages.
209209
$pages = explode('||page_break||', $body);
210-
$first_item = 0;
211210
foreach ($pages as $key => $page_content) {
212211
// For every pages, we create a new file.
213212
$key += 1;

plugin/ims_lti/install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
if (!api_is_platform_admin()) {
9-
die ('You must have admin permissions to install plugins');
9+
die('You must have admin permissions to install plugins');
1010
}
1111

1212
ImsLtiPlugin::create()->install();

plugin/ims_lti/uninstall.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/* For license terms, see /license.txt */
3+
34
/**
45
* Uninstall the MSI/LTI Plugin
56
* @package chamilo.plugin.ims_lti
67
*/
78

89
if (!api_is_platform_admin()) {
9-
die ('You must have admin permissions to uninstall plugins');
10+
die('You must have admin permissions to uninstall plugins');
1011
}
1112

1213
ImsLtiPlugin::create()->uninstall();

src/Chamilo/CoreBundle/Entity/BranchSync.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,4 +741,22 @@ public function setUniqueId($uniqueId)
741741

742742
return $this;
743743
}
744+
745+
/**
746+
* @return string
747+
*/
748+
public function getDescription()
749+
{
750+
return $this->description;
751+
}
752+
753+
/**
754+
* @param string $description
755+
* @return BranchSync
756+
*/
757+
public function setDescription($description)
758+
{
759+
$this->description = $description;
760+
return $this;
761+
}
744762
}

src/Chamilo/UserBundle/Repository/UserRepository.php

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -313,42 +313,4 @@ public function getStudentBosses(User $user)
313313

314314
return $queryBuilder->getQuery()->getResult();
315315
}
316-
317-
/**
318-
* Get number of users in URL
319-
* @param AccessUrl $url
320-
*
321-
* @return int
322-
*/
323-
public function getCountUsersByUrl(AccessUrl $url)
324-
{
325-
return $this->createQueryBuilder('a')
326-
->select('COUNT(a)')
327-
->innerJoin('a.portals', 'u')
328-
->where('u.portal = :u')
329-
->setParameters(['u' => $url])
330-
->getQuery()
331-
->getSingleScalarResult();
332-
}
333-
334-
/**
335-
* Get number of users in URL
336-
* @param AccessUrl $url
337-
*
338-
* @return int
339-
*/
340-
public function getCountTeachersByUrl(AccessUrl $url)
341-
{
342-
$qb = $this->createQueryBuilder('a');
343-
344-
return $qb
345-
->select('COUNT(a)')
346-
->innerJoin('a.portals', 'u')
347-
->where('u.portal = :u and u.group = :g')
348-
->andWhere($qb->expr()->in('a.roles', ['ROLE_TEACHER']))
349-
->setParameters(['u' => $url, 'g' => $group])
350-
->getQuery()
351-
->getSingleScalarResult()
352-
;
353-
}
354316
}

0 commit comments

Comments
 (0)