<commit_before>#person_home
  #personal_details.block
    %h3 Personal Details
    %dl
      %dt Name:
      %dd= @topic.name
      %dt Birth Date:
      %dd.last= @topic.date_of_birth.strftime("%d %B %Y")
      %dt Address:
      %dd= (@topic.address + [@topic.town,@topic.postcode]).reject{|x|x.blank?}.join(", ")
      %dt Mobile:
      %dd= @topic.mobile_number or "-"
      %dt Next of Kin:
      %dd= @topic.next_of_kin or "-"
    %p{:style => "margin:3px 0 0 0"}
      Are any of your personal details incorrect?
      = link_to "Notify us...", "cheese.com"
  #your_thoughts.block
    %h3 What do I need to do today?
    = form_for @topic.notes.new do |f|
      = f.hidden_field :person_id
      = f.text_field :body 
      = submit_tag "Post"
  .person_home_container
    #next_lesson.block
      %h3 Next lesson
      - if @next_timetable_event
        %table
          %tr
            %th= @next_timetable_event.start.strftime('%H.%M%P')
            %td= link_to @next_timetable_event.title, person_timetables_url(@topic)
          %tr
            %th= @next_timetable_event.rooms.join ", "
            %td  A course
      - else 
        %b You have no current timetable events.
  .person_home_container.last
    .block
      %h3 Progress
  .person_home_container  
    #attendance.block{:class => @attendances.empty? ? "blank" : @attendances.last.status}
      - unless @attendances.empty?
        .graph
          %h3 Attendance
          %img{:src => attendance_graph(@attendances)}
        .percent
          %h1= "#{@topic.attendances.last.att_year}%"
          %h4.quiet= "at #{@topic.attendances.last.week_beginning}"
      - else
        %b You have no attendance data, yet.
  .person_home_container.last
    #targets.block
      .person_left
        %h4 Targets    
        = link_to image_tag("target_home.png"), event_filter_url(@topic, {:eventable_type => :Target})
      .person_right      
        #target_list 
          - if @targets.empty?
            %b You have no targets, yet.
          - else
            .stu_target
              .target_date
                %b Due
              .target_body
                %b Target
            - @targets.each do |target|
              .stu_target{:class => target.complete_date ? "complete" : "current", :title => target[:body]}
                .target_date= pretty_date target.target_date
                .target_body= link_to truncate(target[:body], :length => 25), event_filter_url(@topic, {:eventable_type => :Target, :anchor => dom_id(target.events.last)})
  .person_home_container
    .block
      %h3 Advert
  .person_home_container.last
    #moodle_course.block
      .person_left
        %h4 Moodle
        = link_to image_tag("moodle.png"), "#{Ilp2::Application.config.moodle_host}#{Ilp2::Application.config.moodle_path}"
      .person_right
      - if @moodle_courses
        #moodle_course_list      
          - @moodle_courses.each do |mdl|
            .mdl_course{:style => "font-weight: #{mdl["canedit"] == "1" ? "bold" : "normal"}"}= link_to mdl["fullname"], "#{Ilp2::Application.config.moodle_host}#{Ilp2::Application.config.moodle_path}/course/view.php?id=#{mdl["id"]}"
      - else
        %p You have no current Moodle enrolments<commit_msg>relaid front page<commit_after>#person_home
  #personal_details.block
    %h3 Personal Details
    %dl
      %dt Name:
      %dd= @topic.name
      %dt Birth Date:
      %dd.last= @topic.date_of_birth.strftime("%d %B %Y")
      %dt Address:
      %dd= (@topic.address + [@topic.town,@topic.postcode]).reject{|x|x.blank?}.join(", ")
      %dt Mobile:
      %dd= @topic.mobile_number or "-"
      %dt Next of Kin:
      %dd= @topic.next_of_kin or "-"
    %p{:style => "margin:3px 0 0 0"}
      Are any of your personal details incorrect?
      = link_to "Notify us...", "cheese.com"
  #your_thoughts.block
    %h3 What do I need to do today?
    = form_for @topic.notes.new do |f|
      = f.hidden_field :person_id
      = f.text_field :body 
      = submit_tag "Post"
  .person_home_container
    #next_lesson.block
      %h3 Next lesson
      - if @next_timetable_event
        %table
          %tr
            %th= @next_timetable_event.start.strftime('%H.%M%P')
            %td= link_to @next_timetable_event.title, person_timetables_url(@topic)
          %tr
            %th= @next_timetable_event.rooms.join ", "
            %td  A course
      - else 
        %b You have no current timetable events.
  .person_home_container.last
    #attendance.block{:class => @attendances.empty? ? "blank" : @attendances.last.status}
      - unless @attendances.empty?
        .graph
          %h3 Attendance
          %img{:src => attendance_graph(@attendances)}
        .percent
          %h1= "#{@topic.attendances.last.att_year}%"
          %h4.quiet= "at #{@topic.attendances.last.week_beginning}"
      - else
        %b You have no attendance data, yet.

  .person_home_container  
    #targets.block
      .person_left
        %h4 Targets    
        = link_to image_tag("target_home.png"), event_filter_url(@topic, {:eventable_type => :Target})
      .person_right      
        #target_list 
          - if @targets.empty?
            %b You have no targets, yet.
          - else
            .stu_target
              .target_date
                %b Due
              .target_body
                %b Target
            - @targets.each do |target|
              .stu_target{:class => target.complete_date ? "complete" : "current", :title => target[:body]}
                .target_date= pretty_date target.target_date
                .target_body= link_to truncate(target[:body], :length => 25), event_filter_url(@topic, {:eventable_type => :Target, :anchor => dom_id(target.events.last)})
  .person_home_container.last
    .block
      %h3 Advert
  .person_home_container
    #moodle_course.block
      .person_left
        %h4 Moodle
        = link_to image_tag("moodle.png"), "#{Ilp2::Application.config.moodle_host}#{Ilp2::Application.config.moodle_path}"
      .person_right
      - if @moodle_courses
        #moodle_course_list      
          - @moodle_courses.each do |mdl|
            .mdl_course{:style => "font-weight: #{mdl["canedit"] == "1" ? "bold" : "normal"}"}= link_to mdl["fullname"], "#{Ilp2::Application.config.moodle_host}#{Ilp2::Application.config.moodle_path}/course/view.php?id=#{mdl["id"]}"
      - else
        %p You have no current Moodle enrolments
  .person_home_container.last
    .block
      %h3 Progress
{'fraction_non_alphanumeric': 0.130696740305886, 'fraction_numerical': 0.006488490653483702, 'mean_word_length': 2.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4098717', 'n_tokens_mistral': 2216, 'n_tokens_neox': 2155, 'n_words': 429}