library(rmdtools)
library(SeminarMatching)

setwd("D:/libraries/SeminarMatching/semapps/shared/rmd")
db.dir = paste0("../db")
semdb = dbConnect(dbname=paste0(db.dir,"/semDB.sqlite"), drv = SQLite())
seminars = dbGet(semdb,"seminars")


file="admin_overview_en.Rmd"

cat.rmd.params(file)
params = NULL
#cat(paste0(names(res),"=",res, collapse=", "))

today = as.Date(Sys.time())
semester = "SS15"

params = list(
  today = today,
  default_start_date = today-2,
  round1_date = today-1,  
  stud_start_date = today-10,
  round1_done_date = today-1,
  stud.exists = TRUE,
  round2_date = today,
  has_round1_seminar = TRUE,
  round1_seminar = seminars[1,],
  round2_done_date = today,
  has_round2_seminar = !TRUE,
  round2_seminar = seminars[2,],
  last_latecomer_date = today+5,
  semester = semester,
  studmode = "latecomer",
  active_str = function(from, to=NULL, present="current", past="lies in the past", future="lies in the future") {
    today = Sys.time()
    if (is.null(to)) {
      if (today < from) {return(past)}
      if (today > from) {return(future)}
      return(present)
    } else {
      if (today < from) {return(past)}
      if (today > to) {return(future)}
      return(present)
    }
  }
)
copy.into.env(params)
.GlobalEnv$knit_print.Date = function(x,...) {
  restore.point("whisker_print.date")

  format(x, format="%a. %d.%m.%Y")
}
#whisker_print.data.frame = table.knit_print.data.frame

view.rmd(file = file, envir=params,chunks.like.whisker=FALSE,use.commonmark = TRUE, out.type="html")


stop.without.error()

Heute ist der {{today}} und das aktive Semester für die Seminarzuteilung ist das {{semester}}.

Ablauf

< if today > round1_date & ! isTRUE(today > round1_done_date)

Achtung: Die Seminarzuteilung hat noch nicht stattgefunden.

>

< if !is.na(round2_date)

< if today > round2_date & ! isTRUE(today >=round2_done_date)

Achtung: Die Seminarzuteilung hat noch nicht stattgefunden.

>

>



skranz/SeminarMatching documentation built on June 9, 2020, 6:57 p.m.