1 moodle 3 2 3 2.1................................ 3 2.1.1......................... 4 2.1.2 zip........................... 4 2.2......................



Similar documents
ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

WebOS aplat WebOS WebOS 3 XML Yahoo!Pipes Popfry UNIX grep awk XML GUI WebOS GUI GUI 4 CUI

ohp.mgp

事例に見るSCORMの・・・

新コンフィギュレータのフレームワークについて

PowerPoint Presentation

WordPress Ktai Style Ktai Entry 18 Mac 18



r08.dvi

Condition DAQ condition condition 2 3 XML key value

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

GNU Emacs GNU Emacs

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

untitled

MySQL5.0データベース ログファイルおよびステータスの収集

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

Web 1 p.2 1 Servlet Servlet Web Web Web Apache Web Servlet JSP Web Apache Tomcat Jetty Apache Tomcat, Jetty Java JDK, Eclipse

Wiki Wiki Wiki...

Webシステム授業資料

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

II 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C JavaScript Web CGI HTML 1.2 Servlet Java

テクニカルドキュメントのテンプレート

csj-report.pdf

モバイルアプリを Azure で作る - データを扱う Azure Storage を利 してデータを保存する 本稿では PHP と Windows Azure を使って 画像などのファイルを扱うアプリケーションを開発する方法を説明します Windows Azure Platform では データの

1,.,,,., RDBM, SQL. OSS,, SQL,,.

program.dvi

fp.gby

( )!?

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

,, create table drop table alter table

96 8 PHPlot 1. ( 8.1) 4 1: // 2: // $_SERVER[ HTTP_REFERER ]... 3: // $_SERVER[ HTTP_USER_AGENT ]... 4: // $_SERVER[ REMOTE_ADDR ]... ( ) 5: // $_SERV

# mv httpd tar.gz /usr/local/src /usr/local/src # tar zxvf httpd tar.gz make #./configure # make # make install Apache # /usr/local/apac

ORCA (Online Research Control system Architecture)

haskell.gby

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

CodeIgniter Con 2011, Tokyo Japan, February

10th Developer Camp - B5

hands_on_4.PDF

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

New version (2.15.1) of Specview is now available Dismiss Windows Specview.bat set spv= Specview set jhome= JAVA (C:\Program Files\Java\jre<version>\

PowerPoint プレゼンテーション

SOC Report

WebClass

R による統計解析入門

CMS入門

TeraTerm Pro V.2.32の利用法

1 SQL Server SQL Oracle SQL SQL* Plus PL/SQL 2 SQL Server SQL Server SQL Oracle SQL SQL*Plus SQL Server GUI 1-1 osql 1-1 Transact- SQL SELECTFROM 058

shio_ PDF

K227 Java 2

1 ex01.sql ex01.sql ; user_id from (select user_id ;) user_id * select select (3+4)*7, SIN(PI()/2) ; (1) select < > from < > ; :, * user_id user_name

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

経営論集2011_07_小松先生.indd

n n n ( ) n Oracle 16 PostgreSQL 3 MySQL

m_sotsuron

syspro-0405.ppt

Java updated

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

untitled

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

Oracle Lite Tutorial

() < > </ > / HTML SGML HTML 1.1 DTD DTD ( DTD (prolog) )SGML 1. DTD ( ) 2. DTD <!-- DTD-- > <!ELEMENT MAIL - - ((TO,FROM)?,DATE?,BODY) > <!ELEMENT TO

untitled

soto44_kosei_03.pdf

Transcription:

OJT e 055717A 2007/09/20 e e e 20 160 1. moodle 2. moodle 3. moodle 4. moodle question webct 5. moodle 6. moodle 1

1 moodle 3 2 3 2.1................................ 3 2.1.1......................... 4 2.1.2 zip........................... 4 2.2.................................... 5 2.2.1............................... 5 2.3.......................................... 5 2.3.1 CSV.............................. 6 2.3.2.............................. 6 2.4 moodle question webct 6 2.5................................. 6 2.5.1...................................... 7 2.6.......................... 7 2.6.1 zip............................. 7 2.7..................................... 8 3 8 3.1............................................ 8 3.2....................................... 8 3.3............................................ 9 3.4............................................ 9 3.5............................................. 10 4 11 2

1 moodle http://download.moodle.org/ GNU GENERAL PUBLIC LI- CENSE Version 2 1 e PHP,MySQL javascript OS moodle,, dataroot/blocks//block_.php # dataroot/blocks//config_instance.html # dataroot/blocks//db/ # dataroot/lang//block_.php # cron dataroot/mod/ /db/mysql.php dataroot/mod/ /db/mysql.sql dataroot/mod/ /icon.gif # 16x16 dataroot/mod/ /index.php # dataroot/mod/ /lib.php # dataroot/mod/ /mod.html # dataroot/mod/ /version.php # dataroot/mod/ /view.php # dataroot/lang//.php # dataroot/mod/ /config.html # dataroot/filter//defaultsettings.php # dataroot/filter//filter.php # dataroot/filter//filterconfig.html # dataroot/lang//.php # 2 2.1 moodle assignment block zip 1 GPL 3

2.1.1 scandir copy 1. UNIX scandir... 2. copy... 2.1.2 zip zip GNU GENERAL PUBLIC LICENSE phpmyadmin zip.lib.php echo printf /**zip and download $targetfiles *(array)$targetfiles files path which we hope download * * *(int)$targetfilesnum targetfiles num *(int)$countdown counter *(string)$zipname zip file name *(object)$zipfile object for zip and download files *(string)$filename file name *(string)$zip_buffer zip file s buffer * header() HTTP moodle **/ function zip_and_down($targetfiles,$zipname){ $targetfilesnum = count($targetfiles); $countdown = $targetfilesnum-1; //echo <center>target files</center><hr><pre> ;var_dump($targetfiles);echo </pre><hr> ; //printf("countdown = %d <br>filename = %s <br>",$targetfilesnum,$zipname); header( "Content-Type: application/octet-stream" ); header( "Content-disposition: attachment; filename=$zipname" ); require_once( zip.lib.php ); $zipfile = new zipfile(); while($countdown >= 0){ $handle = fopen($targetfiles[$countdown], "rb"); $contents = fread($handle, filesize($targetfiles[$countdown])); fclose($handle); $filename = basename($targetfiles[$countdown]); $zipfile $->$ addfile($contents, $filename ); $countdown--; $zip_buffer = $zipfile$->$file(); print $zip_buffer;//(download) 4

zip print zip zip fopen > fread > print Content-Type: MIME 2.2 moodle HTML 2.2.1 string mbstring mb list encodings mb detect order mb detect encoding UTF-8, UTF-7, ASCII, EUC-JP,SJIS, eucjp-win, SJIS-win, JIS, ISO-2022-JP mb list encodings ISO-8859-1 UTF-8 UTF-8 ISO-8859-1 UTF-8 ASCII UTF-7 UTF-8 ASCII mb convert encodings string moodle CR x0d moodle CR 2 CR+LF windows ASCII 2.3 CSV enrole student unenrole student MySQL CSV 2 http://moodle.org/mod/forum/discuss.php?d=38860 5

2.3.1 CSV CSV, CSV 2.3.2 moodle get records sql select from where MySQL SELECT F ROM W HERE space $query=$select.$space.$from.$space.$where; $users = get_records_sql("$query"); moodle SQL moodle moodle 2.4 moodle question webct moodle question webct question/format/webct/format.php 189 $line = iconv("windows-1252","utf-8",$line); iconv Windows-1252 mb convert encoding $line = mb_convert_encoding($line, UTF-8, auto ); auto 2.5 HTML img 6

2.5.1 imagesize_filter((string),(int),(int) ) width="500" height="250" 1 100 100 setpercenttage function imagesize_filter($imagefile=,$maxwidthsize=0,$maxhightsize=0) { $imgstring = ; if($imageinfo = getimagesize($imagefile)){ $setpercenttage = array(100,95,90,85,80,75,70,75,70,65,60,55,50,45,40,35,30,25,20,15,10,5,4,3,2,1); $maxcount = count($setpercenttage); $count = 0; while($imageinfo[0]*$setpercenttage[$count]*0.01 > $maxwidthsize){ if ($count+1 >= $maxcount){ break; $count++; while($imageinfo[1]*$setpercenttage[$count]*0.01 > $maxhightsize){ if ($count+1 >= $maxcount){ break; $count++; $imgstring.= width=".$imageinfo[0]*$setpercenttage[$count]*0.01. " height=".$imageinfo[1]*$setpercenttage[$count]*0.01. " ; return $imgstring; 2.6 2.6.1 zip zip 0Kbyte zip zip zip files() zip moolde header() moolde readfile() PHP if (!zip_files(,zip )) { error(get_string("zipfileserror","error")); else{ echo success!! ; 7

//print header header( "Content-Type: application/octet-stream" ); header( "Content-disposition: attachment; filename= " ); if(!readfile(zip )){ printf( can not read %s,$zipfilename); 2.7 moodle 3 README.txt README.txt mysql.sql option mysql.sql sample CREATE TABLE prefix_sample ( id int(10) NOT NULL auto_increment, course int(10) NOT NULL default 0, timemodified int(10) NOT NULL default 0, name varchar(255) NOT NULL default, PRIMARY KEY (id), KEY course (course) ) TYPE=MyISAM COMMENT= sample Module ; moodle 3 3.1 moodle moodle 3.2 3 http://download.moodle.org/plugins16/mod/newmodule.zip 8

3.3 3.4 CGI CGI CGI 4 4 http://www.asahi-net.or.jp/ wv7y-kmr/memo/php security.html 9

moodle capability moodle SQL $cmd = optinal_param( cmd,, RAW ); exec($cmd); rm $str = optinal_param( cmd,, RAW ); echo $str; HTML JavaScript moodle $count = optinal_param( cmd,, INT ); while($count > 0){ printf("roop %d",$count); $count--; URL URL 3.5 moodle 10

4 [1] moodle http://moodle.org/course/view.php?id=14 [2] moodle download http://download.moodle.org/ [3] PHP 2006/11/6 [4] PHP http://www.php.net/manual/ja/ [5] PHP Web http://www.asahi-net.or.jp/~wv7y-kmr/memo/php_security.html 11

e 12