$newline never

$# SPDX-FileCopyrightText: 2022 Steffen Jost <jost@tcs.ifi.lmu.de>
$#
$# SPDX-License-Identifier: AGPL-3.0-or-later

$if null quals 
  _{MsgQualificationUserNone}
$else   
  $forall (Entity _ quali, mbQualUsr, mbLmsUsr, validity) <- quals
    <section>
      <div .container>
        <h2>
          #{qualificationShorthand quali} - #{qualificationName quali} (#{qualificationSchool quali}) &nbsp; #{boolSymbol (E.unValue validity)} 
        <div .container>
          <dl .deflist>
            $maybe (Entity _ qualUsr) <- mbQualUsr    
              <dt .deflist__dt>_{MsgLmsQualificationValidUntil}
              <dd .deflist__dd>^{formatTimeW SelFormatDate (qualificationUserValidUntil qualUsr)}
                $if not (qualificationUserScheduleRenewal qualUsr)
                  \ #{icon IconNoNotification}
              $maybe (qblock) <- qualificationUserBlockedDue qualUsr
                <dt .deflist__dt>_{MsgTableQualificationBlockedDue}
                <dd .deflist__dd>^{formatTimeW SelFormatDate (qualificationBlockedDay qblock)}
                  \ #{icon IconBlocked} 
                  \ #{qualificationBlockedReason qblock}
              <dt .deflist__dt>_{MsgTableQualificationLastRefresh}
              <dd .deflist__dd>^{formatTimeW SelFormatDate (qualificationUserLastRefresh qualUsr)}
              <dt .deflist__dt>_{MsgTableQualificationFirstHeld}
              <dd .deflist__dd>^{formatTimeW SelFormatDate (qualificationUserFirstHeld qualUsr)}

            $maybe (Entity _ lmsUsr) <- mbLmsUsr    
              <dt .deflist__dt>_{MsgTableLmsStarted}
              <dd .deflist__dd>^{formatTimeW SelFormatDateTime (lmsUserStarted lmsUsr)}
              $maybe _ <- lmsUserStatus lmsUsr
                <dt .deflist__dt>_{MsgTableLmsStatus}
                <dd .deflist__dd>^{lmsUserStatusWidget True lmsUsr}
              <dt .deflist__dt>_{MsgTableLmsIdent}
              <dd .deflist__dd .email>#{getLmsIdent (lmsUserIdent lmsUsr)}
              <dt .deflist__dt>_{MsgTableLmsPin}
              <dd .deflist__dd >
                <span .email>
                  #{lmsUserPin lmsUsr}
                <br>
                ^{formatTimeW SelFormatDateTime (lmsUserDatePin lmsUsr)} 
                $if lmsUserResetPin lmsUsr
                  \ #{icon IconReset}
              $maybe ts <- lmsUserReceived lmsUsr
                <dt .deflist__dt>_{MsgTableLmsReceived}
                <dd .deflist__dd>^{formatTimeW SelFormatDateTime ts}
              $maybe ts <- lmsUserNotified lmsUsr
                <dt .deflist__dt>_{MsgTableLmsNotified}
                <dd .deflist__dd>^{formatTimeW SelFormatDateTime ts}
              $maybe ts <- lmsUserEnded lmsUsr
                <dt .deflist__dt>_{MsgTableLmsEnded}
                <dd .deflist__dd>^{formatTimeW SelFormatDateTime ts}
          

