「モジュール:SMWメンバー情報」の版間の差分

setPropertyはこの場所にも置くべきだったのか?
(前田敦子、白石麻衣のように1グループしか所属してなかった人の選抜、センター回数の表記が?になっていたのを補正)
(setPropertyはこの場所にも置くべきだったのか?)
タグ: 手動差し戻し
 
(同じ利用者による、間の5版が非表示)
61行目: 61行目:
   dataStore["選抜回数"] = {}
   dataStore["選抜回数"] = {}


   local lines_s = mw.text.split(args["選抜回数"]or "", '<br>')
   local lines_s = mw.text.split(args["選抜回数"] or "", '<br>')
   mw.logObject(lines_s)
   mw.logObject(lines_s)
   local total_s = 0
   local total_s = 0
70行目: 70行目:
       -- If the group is not extracted, use the provided group
       -- If the group is not extracted, use the provided group
       if not extractedGroup or extractedGroup == "" then
       if not extractedGroup or extractedGroup == "" then
         extractedGroup = args["グループ"] or args["元グループ"] or ""
         extractedGroup = args["元グループ"] or args["グループ"] or ""
       end
       end
       -- If the num is nil, return an error
       -- If the num is nil, return an error
77行目: 77行目:
       end
       end
       -- Store the group and selection times
       -- Store the group and selection times
       total_s = total_s + tonumber(num)
       if tonumber(num) > 0 then
      table.insert(dataStore["選抜回数"], extractedGroup .. ';' .. num)
        total_s = total_s + tonumber(num)
        table.insert(dataStore["選抜回数"], extractedGroup .. ';' .. num)
      end
   end
   end
   -- Add the total selection times to the dataStore
   -- Add the total selection times to the dataStore
86行目: 88行目:
   dataStore["選抜回数"] = {}
   dataStore["選抜回数"] = {}


   local lines_c = mw.text.split(args["センター回数"]or "", '<br>')
   local lines_c = mw.text.split(args["センター回数"] or "", '<br>')
   mw.logObject(lines_c)
   mw.logObject(lines_c)
   local total_c = 0
   local total_c = 0
95行目: 97行目:
       -- If the group is not extracted, use the provided group
       -- If the group is not extracted, use the provided group
       if not extractedGroup or extractedGroup == "" then
       if not extractedGroup or extractedGroup == "" then
         extractedGroup = args["グループ"] or args["元グループ"] or ""
         extractedGroup = args["元グループ"] or args["グループ"] or ""
       end
       end
       -- If the num is nil, return an error
       -- If the num is nil, return an error
102行目: 104行目:
       end
       end
       -- Store the group and selection times
       -- Store the group and selection times
       total_c = total_c + tonumber(num)
       if  tonumber(num) > 0 then
      table.insert(dataStore["センター回数"], extractedGroup .. ';' .. num)
        total_c = total_c + tonumber(num)
        table.insert(dataStore["センター回数"], extractedGroup .. ';' .. num)
      end
   end
   end
   -- Add the total selection times to the dataStore
   -- Add the total selection times to the dataStore
   dataStore["センター回数合計"] = total_c
   if total_c > 0 then
    dataStore["センター回数合計"] = total_c
  end


   local generation = ''
   local generation = ''
119行目: 125行目:
   dataStore["選抜回数"] = {}
   dataStore["選抜回数"] = {}


   local lines_s = mw.text.split(args["選抜回数"]or "", '<br>')
   local lines_s = mw.text.split(args["選抜回数"] or "", '<br>')
   mw.logObject(lines_s)
   mw.logObject(lines_s)
   local total_s = 0
   local total_s = 0
127行目: 133行目:
       -- If the group is not extracted, use the provided group
       -- If the group is not extracted, use the provided group
       if not extractedGroup or extractedGroup == "" then
       if not extractedGroup or extractedGroup == "" then
         extractedGroup = args["グループ"] or args["元グループ"] or ""
         extractedGroup = args["元グループ"] or args["グループ"] or ""
         num = mw.ustring.match(line, "(%d+)回")
         num = mw.ustring.match(line, "(%d+)回")
       end
       end
135行目: 141行目:
       end
       end
       -- Store the group and selection times
       -- Store the group and selection times
       total_s = total_s + tonumber(num)
       if tonumber(num) > 0 then
      table.insert(dataStore["選抜回数"], extractedGroup .. ';' .. num)
        total_s = total_s + tonumber(num)
        table.insert(dataStore["選抜回数"], extractedGroup .. ';' .. num)
      end
   end
   end
   -- Add the total selection times to the dataStore
   -- Add the total selection times to the dataStore
145行目: 153行目:
   dataStore["センター回数"] = {}
   dataStore["センター回数"] = {}


   local lines_c = mw.text.split(args["センター回数"]or "", '<br>')
   local lines_c = mw.text.split(args["センター回数"] or "", '<br>')
   mw.logObject(lines_c)
   mw.logObject(lines_c)
   local total_c = 0
   local total_c = 0
153行目: 161行目:
       -- If the group is not extracted, use the provided group
       -- If the group is not extracted, use the provided group
       if not extractedGroup or extractedGroup == "" then
       if not extractedGroup or extractedGroup == "" then
         extractedGroup = args["グループ"] or args["元グループ"] or ""
         extractedGroup = args["元グループ"] or args["グループ"] or ""
         num = mw.ustring.match(line, "(%d+)回")
         num = mw.ustring.match(line, "(%d+)回")
       end
       end
161行目: 169行目:
       end
       end
       -- Store the group and selection times
       -- Store the group and selection times
       total_c = total_c + tonumber(num)
       if tonumber(num) > 0 then
      table.insert(dataStore["センター回数"], extractedGroup .. ';' .. num)
        total_c = total_c + tonumber(num)
        table.insert(dataStore["センター回数"], extractedGroup .. ';' .. num)
      end
   end
   end
   -- Add the total selection times to the dataStore
   -- Add the total selection times to the dataStore
   dataStore["センター回数合計"] = total_c
 
   if total_c > 0 then
    dataStore["センター回数合計"] = total_c
  end
 
   setProperty(dataStore);
   setProperty(dataStore);


管理者、user-upload
32,745

回編集