| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function up(Schema $schema) |
||
| 23 | { |
||
| 24 | $em = $this->getEntityManager(); |
||
| 25 | |||
| 26 | $result = $em |
||
| 27 | ->getRepository('ChamiloCoreBundle:SettingsCurrent') |
||
| 28 | ->findOneBy(['variable' => 'scorm_cumulative_session_time']); |
||
| 29 | |||
| 30 | $cumulativeScormTime = 1; |
||
| 31 | if ($result->getSelectedValue() === 'false') { |
||
| 32 | $cumulativeScormTime = 0; |
||
| 33 | } |
||
| 34 | $this->addSql("UPDATE c_lp SET accumulate_scorm_time = $cumulativeScormTime"); |
||
| 35 | } |
||
| 47 |