changeset 52:46e53418e28f

missing selection condition added
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 22 Jul 2015 22:04:45 +0900
parents 0c26f4461d0b
children f1081d474906
files s4-funcs.sh
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/s4-funcs.sh	Wed Jul 22 21:31:56 2015 +0900
+++ b/s4-funcs.sh	Wed Jul 22 22:04:45 2015 +0900
@@ -42,12 +42,12 @@
 グループへの一斉送信機能は付いたが表に出てない(7/6)
 ひとつのarticleをheadingにして新規ツリーを作成、あるといいかも。
 
-7/19	設置
+7/19	○設置
 	締切設定
-	一斉送信
+	○一斉送信
 	自分の提出物リスト
-	getparfilename の tmpd の扱い
-	やっぱりs4にしようかな
+	○getparfilename の tmpd の扱い
+	○やっぱりs4にしようかな
 7/18	○書込著者からホームへのリンク
 7/17	○個人blogに「レポート提出用」がついたときの挙動
 	○添付ファイル回収
@@ -1117,6 +1117,8 @@
   query "replace into par values('$session', 'pswd', 'string', 'wasureta'),
 ('$session', 'user', 'string', '$email');"
   wasureta $email
+  echo "<p>このアドレスに初期パスワードを送信しました。</p>"
+  echo "<p>新着メイルを確認してログインしてください。</p>"
   addsession $1			# for removal after 1 minute
   m4 -D_SYSNAME_="Initial Login" -D_MYNAME_="$myname?userconf" \
      $layout/login.m4.html
@@ -1163,9 +1165,9 @@
 }
 
 listgroupbytable() {
-  # $1=deffile
+  # $1=deffile $2...=condition
   tagline=`grep :tag: $1`; shift
-  and="${1:+and }"
+  and="${1:+and }" where=${1:+where }
   href="<a href=\"$myname?grp+"
   echo '<div class="listgroup">'
   NGsql="select distinct tag from\
@@ -1179,7 +1181,7 @@
 err ListGrp: tag=$tag
     tn=${tagline%%=${tag}*}
     tn=${tn##*[ :]}
-    sql="select rowid||':'||gname as 'グループ名',説明 from (select (select rowid from grp g where g.gname=grp_s.gname) as rowid,gname,max(case key when 'gecos' then val end) as '説明',max(case key when 'tag' then val end) as 'tag',max(case key when 'mtime' then val end) as mtime from grp_s group by gname having tag='$tag' order by mtime desc);"
+    sql="select rowid||':'||gname as 'グループ名',説明 from (select (select rowid from grp g where g.gname=grp_s.gname) as rowid,gname,max(case key when 'gecos' then val end) as '説明',max(case key when 'tag' then val end) as 'tag',max(case key when 'mtime' then val end) as mtime from grp_s $where$* group by gname having tag='$tag' order by mtime desc);"
  err PersonalGroupList= `echo $sql`
     echo "<h2>$tn</h2>"
     echo '<table class="b listgroup">'

yatex.org