Commit 259229b3 by 冷斌

fix bug

parent 0e8f1c52
...@@ -45,6 +45,17 @@ class ExamsPaperModel extends Model ...@@ -45,6 +45,17 @@ class ExamsPaperModel extends Model
return $list; return $list;
} }
protected function getAttachPathByAttachId($attachid) {
if (empty($attachid)) {
return '';
}
if ($attachInfo = model('Attach')->getAttachById($attachid)) {
return $attachInfo['save_path'] . $attachInfo['save_name'];
} else {
return '';
}
}
/** /**
* 数据处理 * 数据处理
* @Author MartinSun<syh@sunyonghong.com> * @Author MartinSun<syh@sunyonghong.com>
...@@ -62,7 +73,7 @@ class ExamsPaperModel extends Model ...@@ -62,7 +73,7 @@ class ExamsPaperModel extends Model
$data[$key]['exams_module_title'] = $this->getModuleTitleAttr($v['exams_module_id']); $data[$key]['exams_module_title'] = $this->getModuleTitleAttr($v['exams_module_id']);
$data[$key]['level_title'] = $this->getLevelTitle($v['level']); $data[$key]['level_title'] = $this->getLevelTitle($v['level']);
$data[$key]['is_buy'] = $this->isBuy($v['exams_paper_id'], $this->mid); $data[$key]['is_buy'] = $this->isBuy($v['exams_paper_id'], $this->mid);
$data[$key]['attachment'] = getAttachPathByAttachId($v['attachment']); $data[$key]['attachment'] = $this->getAttachPathByAttachId($v['attachment']);
// 判断自动组卷(1)和手动组卷 // 判断自动组卷(1)和手动组卷
if ($v['assembly_type'] == 1) { if ($v['assembly_type'] == 1) {
$paper_options = unserialize($v['paper_options']); $paper_options = unserialize($v['paper_options']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment