Exemplo n.º 1
0
defined('_HZEXEC_') or die;
$results = null;
$notes = $this->model->notes($this->filters);
if ($notes) {
    foreach ($notes as $note) {
        $ky = $note->get('scope_id');
        if (!isset($results[$ky])) {
            $results[$ky] = array();
        }
        $results[$ky][] = $note;
    }
}
$base = $this->offering->link();
if ($results) {
    foreach ($results as $id => $notes) {
        $lecture = new \Components\Courses\Models\Assetgroup($id);
        $unit = \Components\Courses\Models\Unit::getInstance($lecture->get('unit_id'));
        echo $this->escape(stripslashes($lecture->get('title'))) . "\n";
        echo '--------------------------------------------------' . "\n";
        foreach ($notes as $note) {
            echo '#' . $note->get('id');
            if ($note->get('timestamp') != '00:00:00') {
                echo ' video time: ' . $this->escape($note->get('timestamp'));
            }
            echo "\n";
            echo $this->escape(stripslashes($note->get('content')));
            echo "\n\n";
        }
        echo "\n";
    }
}
Exemplo n.º 2
0
    echo Lang::txt('PLG_COURSES_NOTES_GO');
    ?>
" />
			</p>
		</div><!-- / .filters-inner -->
	</fieldset>
</form>

<div class="notes-wrap">
<?php 
    if ($results) {
        ?>
	<?php 
        foreach ($results as $id => $notes) {
            $lecture = new \Components\Courses\Models\Assetgroup($id);
            $unit = \Components\Courses\Models\Unit::getInstance($lecture->get('unit_id'));
            ?>
	<div class="section">
		<h3><?php 
            echo $this->escape(stripslashes($lecture->get('title')));
            ?>
</h3>
		<?php 
            foreach ($notes as $note) {
                ?>
		<div class="jSticky-medium static<?php 
                if ($note->get('access')) {
                    echo ' annotation';
                }
                ?>
" id="note-<?php 
Exemplo n.º 3
0
 /**
  * Copy an entry and all associated data
  *
  * @return	void
  */
 public function copyTask()
 {
     // Incoming
     $id = Request::getVar('id', array());
     // Get the single ID we're working with
     if (is_array($id)) {
         $id = !empty($id) ? $id[0] : 0;
     }
     if (!$id) {
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&unit=' . Request::getInt('unit', 0), false), Lang::txt('COM_COURSES_ERROR_NO_ID'), 'error');
         return;
     }
     $assetgroup = new \Components\Courses\Models\Assetgroup($id);
     if (!$assetgroup->copy()) {
         // Redirect back to the courses page
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&unit=' . $assetgroup->get('unit_id'), false), Lang::txt('COM_COURSES_ERROR_COPY_FAILED') . ': ' . $assetgroup->getError(), 'error');
         return;
     }
     // Redirect back to the courses page
     App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&unit=' . $assetgroup->get('unit_id'), false), Lang::txt('COM_COURSES_ITEM_COPIED'));
 }
Exemplo n.º 4
0
 */
// No direct access
defined('_HZEXEC_') or die;
$ag = new \Components\Courses\Models\Assetgroup($this->scope_id);
?>

<div class="edit-assetgroup">
	<form action="<?php 
echo Request::base(true);
?>
/api/courses/assetgroup/save" method="POST" class="edit-form">

		<p>
			<label for="title">Title:</label>
			<input type="text" name="title" value="<?php 
echo $ag->get('title');
?>
" placeholder="Asset Group Title" />
		</p>
		<p>
			<label for="state">Published:</label>
			<select name="state">
				<option value="0"<?php 
if ($ag->get('state') == 0) {
    echo ' selected="selected"';
}
?>
><?php 
echo Lang::txt('JNo');
?>
</option>