123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- class DropboxLink extends EvalLink
- {
- private $dropbox_table = null;
-
- public function __construct()
- {
- parent::__construct();
- $this->set_type(LINK_DROPBOX);
- }
-
- public function get_view_url($stud_id)
- {
-
-
- $eval = $this->get_evaluation();
- $sql = 'SELECT filename FROM '.$this->get_dropbox_table()
- .' WHERE c_id = '.$this->course_id.' AND uploader_id = '.intval($stud_id)
- ." AND title = '".Database::escape_string($eval->get_name())."'";
- $result = Database::query($sql);
- if ($fileurl = Database::fetch_row($result)) {
- return null;
- } else {
- return null;
- }
- }
- public function get_type_name()
- {
- return get_lang('LMSDropbox');
- }
- public function is_allowed_to_change_name()
- {
- return false;
- }
-
- private function get_dropbox_table()
- {
- $this->dropbox_table = Database::get_course_table(TABLE_DROPBOX_FILE);
- return $this->dropbox_table;
- }
- public function get_icon_name()
- {
- return 'dropbox';
- }
- }
|