Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7ea663f
Update 1229 : JohnR2 Version
TLOGBen Dec 29, 2017
c733bf5
0403總和性update
kuangching Apr 3, 2018
30c83da
Add files via upload
Bo6y Apr 11, 2018
7bfeb46
about historyscore
Bo6y Apr 11, 2018
2c13455
about historyscore
Bo6y Apr 11, 2018
d7f2932
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
cdf334b
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
fc5a2b0
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
7ad4f2f
Merge remote-tracking branch 'origin/JohnR2' into JohnR2
TLOGBen Apr 12, 2018
e50ca9a
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
2afb0af
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
07c21ba
0412 Ckeditor.js update
TLOGBen Apr 13, 2018
0bdf98e
更新新增問卷ckediter問題
kuangching Apr 13, 2018
c430fcf
0412 Ckeditor.js update
TLOGBen Apr 13, 2018
65df5d1
Merge remote-tracking branch 'origin/JohnR2' into JohnR2
TLOGBen Apr 13, 2018
43abfb4
0413 Ckeditor.js update
TLOGBen Apr 13, 2018
240a2cb
0413 Ckeditor.js fix bug
TLOGBen Apr 13, 2018
c802770
0413 zoom.js/css update
TLOGBen Apr 13, 2018
78f67c5
0413 QR zoom
TLOGBen Apr 13, 2018
a724e89
0412 Ckeditor.js update
TLOGBen Apr 14, 2018
0eb0ada
0414 url update
TLOGBen Apr 14, 2018
a5d77c8
0414 url update
TLOGBen Apr 14, 2018
9b6b55f
0414 url update
TLOGBen Apr 14, 2018
cbacb96
04.14 Url update
TLOGBen Apr 14, 2018
84b3dbe
04.14 Url update
TLOGBen Apr 14, 2018
1714f12
Update 1229 : JohnR2 Version
TLOGBen Dec 29, 2017
cf3d89a
0403總和性update
kuangching Apr 3, 2018
366c266
Add files via upload
Bo6y Apr 11, 2018
81ce583
about historyscore
Bo6y Apr 11, 2018
50a58c4
about historyscore
Bo6y Apr 11, 2018
9717f17
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
d69db4e
0412 Ckeditor.js update
TLOGBen Apr 12, 2018
a2d1822
更新新增問卷ckediter問題
kuangching Apr 13, 2018
49c1ace
0412 Ckeditor.js update
TLOGBen Apr 13, 2018
c76bb0a
0413 Ckeditor.js update
TLOGBen Apr 13, 2018
e25c8cb
0413 Ckeditor.js fix bug
TLOGBen Apr 13, 2018
790c114
0413 zoom.js/css update
TLOGBen Apr 13, 2018
4affacb
0413 QR zoom
TLOGBen Apr 13, 2018
e03b14b
0412 Ckeditor.js update
TLOGBen Apr 14, 2018
388df0b
0414 url update
TLOGBen Apr 14, 2018
650f545
0414 url update
TLOGBen Apr 14, 2018
af4959a
0414 url update
TLOGBen Apr 14, 2018
474c9b8
04.14 Url update
TLOGBen Apr 14, 2018
7d7757c
04.14 Url update
TLOGBen Apr 14, 2018
11c7ef4
04.14 johnr2 branch rebase
TLOGBen Apr 14, 2018
5cbacf3
Merge remote-tracking branch 'origin/JohnR2' into JohnR2
TLOGBen Apr 14, 2018
b025921
04.14 johnr2 url UPDATE
TLOGBen Apr 14, 2018
e547872
Merge remote-tracking branch 'origin/master' into JohnR2
TLOGBen Apr 15, 2018
3410489
04.15 some bug
TLOGBen Apr 15, 2018
16ad2ba
更新符合協商後的格式
kuangching Apr 22, 2018
cb77c0c
endclass改為cache
kuangching Apr 22, 2018
6fe04f4
修改finishaction使其可以刪除endclass cache
kuangching Apr 22, 2018
ad8169b
endclass學生端更新
kuangching Apr 22, 2018
2eee094
endclass bugfix
kuangching Apr 23, 2018
4bcc011
刪除學生端session
kuangching Apr 23, 2018
95912c4
處理單題測驗新版_教師端
kuangching Apr 23, 2018
59c1464
處理新版單題測驗finishaction
kuangching Apr 23, 2018
3538e9d
修正旁邊連結問題
kuangching Apr 23, 2018
ebd2baf
修正 my controllers
kuangching Apr 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# IRS
IRS for Querisma
----------------
* Application 資料夾存放前後控制端
* Recourse 存放所使用的資源

版本號:6.2 <br>

新增變動: CkFinder
1. recource/js/Ckeditor.js 更新<br>
1.新增Auto方法<br>
2.新增編輯器對編輯器輸出方法<br>
2. application/library/“ckeditor”、“ckfinder” <br>兩個函式庫,轉去/recource/內部
3. application/view/Example新增範例<br>
4. Ckfinder使用方法見index.html
5. /IRS/User請給他+777,此為預設上傳路徑
6. /recource/ckfinder/config.php請調整63行“BackEnd”內部的路徑
www_v6
新增見注意
195 changes: 195 additions & 0 deletions Startquiz.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
<?php
class Startquiz extends MY_Controller{
public function index(){
//$this->checkMethod_teacher();
$this->load->view('FOUNDCLASS/QuizPage.html');
}
public function quizpageforstu(){
//$this->checkMethod_teacher();
$this->load->view('FOUNDCLASS/Popquiz.html');
}

public function getQuizinfo(){
if($_SESSION['user']['user_Identity']==0){
$this->load->library('MP_Cache');
$data=array(
'quiz_Id'=>(int)$_SESSION['course']['quiz_Id'],
);
$data_return=$this->getquestion($data);
$cdata_set=array();
$cdata_ans_set=array();
for($i=0;$i<count($data_return);$i++){
if($i%7!=5){
$cdata_set[]=$data_return[$i];
}
else {
$cdata_ans_set[]=$data_return[$i];
}
}
$cdata_name=$_SESSION['course']['class_Id'].'_'.$data['quiz_Id'];
$cdata = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata === false){
$cdata = $cdata_set;
$this->mp_cache->write($cdata,$cdata_name,7200);
}

$cdata_name=$_SESSION['course']['class_Id'].'_'.$data['quiz_Id'].'_'.'ans';
$cdata = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata === false){
$cdata = $cdata_ans_set;
$this->mp_cache->write($cdata,$cdata_name,7200);
}

echo json_encode($data_return);


}else if($_SESSION['user']['user_Identity']==1){
$this->load->library('MP_Cache');
$cdata_name=$_SESSION['classandquiz']['class_Id'].'_'.$_SESSION['classandquiz']['quiz_Id'];
$cdata = $this->mp_cache->get($cdata_name);
echo json_encode($cdata);
}

}
public function getquestion($data){
$this->load->model('Quiz_model','quiz');
$this->load->model('Question_model','question');
$res=$this->quiz->findknowedquiz($data);
$question_array=explode('_',$res[0]['irs_Quiz_Question_Id']);
$data_question=array();
foreach($question_array as $a){
if($a!='')
array_push($data_question,$a);
}
$result=$this->question->findselectQuestion($data_question);
$data_return=array();
foreach($result as $b){
array_push($data_return,$b["question_Content"],$b["question_Optiona"],$b["question_Optionb"],$b["question_Optionc"],$b["question_Optiond"],$b["question_Answer"],$b["question_Time"]);
}
return $data_return;
}
public function endquiz(){
$this->load->library('MP_Cache');

$cdata = array(
'endclass'=> 1
);
$cdata_name=$cdata_name=$_SESSION['course']['class_Id'].'_endclass';
$this->mp_cache->write($cdata, $cdata_name,7200);
}
public function finishaction(){
$this->load->model('This_class_model','this_class');
$cdata_name=$_SESSION['course']['class_Id'].'_'.$_SESSION['course']['quiz_Id'];
$this->load->library('MP_Cache');
$cdata_quiz = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata_quiz!== false){
$this->mp_cache->delete($cdata_name);
}
$cdata=$_SESSION['course']['pin'];
$cdata_pin= $this->mp_cache->set_name($cdata)->get();
if ($cdata_pin!== false){
$this->mp_cache->delete($cdata);
}
$cdata=$_SESSION['course']['class_Id'].'_endclass';
$cdata_endclss= $this->mp_cache->set_name($cdata)->get();
if ($cdata_endclss!== false){
$this->mp_cache->delete($cdata);
}
$this->load->model('Shadow_quiz_model','shadow_quiz');
$data=array(
'quiz_Id'=>$_SESSION['course']['quiz_Id'],
'class_Id'=>$_SESSION['course']['class_Id'],
'quiz_Score_List'=>'jason@100@',//需從前端皆值
);
$this->shadow_quiz->createShadow_quiz($data);
$this->load->model('Rollcall_model','rollcall');
$roll_list=array(
'class_Id'=>$_SESSION['course']['class_Id'],
'rollcall_Name'=>$_SESSION['course']['course_Name'],
'rollcall_Allmember'=>'jason'//需從前端皆值
);
$this->rollcall->createRollcall($roll_list);
$this->deletequestiontime();
echo json_encode('OK');
}

public function setopinion(){//設置評價和刪除答案快取
$cdata_name=$_SESSION['course']['class_Id'].'_'.$_SESSION['course']['quiz_Id'].'_'.'ans';
$this->load->library('MP_Cache');
$cdata_quiz_ans = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata_quiz_ans!== false){
$this->mp_cache->delete($cdata_name);
}
$this->load->model('Shadow_quiz_model','shadow_quiz');
$data=array(
'quiz_Id'=>$_SESSION['course']['quiz_Id'],
'class_Id'=>$_SESSION['course']['class_Id'],
);
$opinion=array(
'shadow_Quiz_opinion'=>'',//需從前端皆值
);
$this->shadow_quiz->updateShadow_quiz($data,$opinion);
}

public function checkans(){//學生交卷並閱卷//單題適用
$cdata_name=$_SESSION['classandquiz']['class_Id'].'_'.$_SESSION['classandquiz']['quiz_Id'].'_'.'ans';
$this->load->library('MP_Cache');
$cdata_quiz_ans = $this->mp_cache->set_name($cdata_name)->get();
$cdata_name=$_SESSION['classandquiz']['class_Id'].'_time';
$cdata_time = $this->mp_cache->set_name($cdata_name)->get();
$anspoint = null;
$date=date_create();
$checktime=date_timestamp_get($date);
if ($cdata_quiz_ans!== false){
$anstime=$checktime-$cdata_time['time'];//學生答題時間
$ansalltime=$_POST['ansalltime'];//題目總花時間
$ans=$_POST['ans'];
$question_num=$_POST['question_num'];
if($ans==$cdata_quiz_ans[$question_num]){
$anspoint=(1000/$ansalltime)*($anstime);
$anspoint=1000-(int)$anspoint;
}
else{
$anspoint=0;
}
$this->load->model('Student_quiz_model','student_quiz');
$data=array(
'user_Id'=>$_SESSION['user']['user_Id'],
'quiz_Id'=>$_SESSION['classandquiz']['quiz_Id'],
'class_Id'=>$_SESSION['classandquiz']['class_Id'],
'answer_List'=>$ans,
'score_List'=>$anspoint,
'student_Quiz_Total_Score'=>$anspoint,
);
$this->student_quiz->createStudent_quiz($data);
}
echo json_encode($anspoint);
}

public function setquestiontime(){//設置題目開始時間
$this->load->library('MP_Cache');
$date=date_create();
$date=date_timestamp_get($date);
$cdata_name=$_SESSION['course']['class_Id'].'_time';
$cdata = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata === false){
$cdata = array(
'time'=>$date,
);
$this->mp_cache->write($cdata,$cdata_name,7200);
}
echo json_encode(True);
}

public function deletequestiontime(){//刪除題目開始時間_教師用
$this->load->library('MP_Cache');
$cdata_name=$_SESSION['course']['class_Id'].'_time';
$cdata_time = $this->mp_cache->set_name($cdata_name)->get();
if ($cdata_time!== false){
$this->mp_cache->delete($cdata_name);
}
}



}
2 changes: 2 additions & 0 deletions UsersFiles/.ckfinder/cache/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:2304;s:6:"height";i:4096;s:4:"size";i:2327276;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:2304;s:6:"height";i:4096;s:4:"size";i:2327276;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:94;s:4:"size";i:11717;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:4096;s:6:"height";i:768;s:4:"size";i:289390;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Files/IMG_0003.PNG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:375;s:4:"size";i:95454;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Files/IMG_0009.JPG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:291;s:6:"height";i:400;s:4:"size";i:34923;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:281;s:4:"size";i:243083;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Files/IMG_0055.PNG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:281;s:4:"size";i:243083;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:94;s:4:"size";i:11717;}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:375;s:4:"size";i:95454;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/IMG_0003.PNG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:1600;s:6:"height";i:1200;s:4:"size";i:803525;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/IMG_0004.JPG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:400;s:6:"height";i:400;s:4:"size";i:27790;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/IMG_0006.JPG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:848;s:6:"height";i:1200;s:4:"size";i:170162;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/IMG_0018.JPG.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:676;s:6:"height";i:492;s:4:"size";i:91147;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/IMG_0051.jpg.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:500;s:6:"height";i:375;s:4:"size";i:6886;}
1 change: 1 addition & 0 deletions UsersFiles/.ckfinder/cache/data/Images/image.jpg.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:5:"width";i:1600;s:6:"height";i:1200;s:4:"size";i:122856;}
2 changes: 2 additions & 0 deletions UsersFiles/.ckfinder/cache/thumbs/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions UsersFiles/.ckfinder/logs/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all
Loading