EASOL / easol

EASOL - A New Way to Open Learning with Ed-Tech
http://easol.org
GNU Affero General Public License v3.0
1 stars 4 forks source link

Issue with Assessments #338

Closed edgarf closed 7 years ago

edgarf commented 8 years ago

@regiscamimura, please research these two issues: 1) when tapping back from assessments details to assesment list. If there was a selected filter elements - the results are not filtered on that. I need to reselect it again.

2) https://easol-dev-staging.azurewebsites.net/assessments here if you select the first school in the list, then it's very often when the amount of students on the listing (Assessment list) doesn't match the details page. (example here - https://easol-dev-staging.azurewebsites.net/assessments/details/STM/3/121/2012/1334966400)

regiscamimura commented 8 years ago

@edgarf Just got the filter issue done. FYI, it now changes the URL hash so filter status can also be bookmarked.

Regarding the missmatching number of students, that's a tricky one. I reviewed the code, and what happens is that when you're in the assessment index page, some students are being listed more than once in the query due to a join on the StudentSchoolAssociation (that verifies that the student is under the school session context), but some students has more than one record on that table because it seems a new association must be created every year.

So here comes the tricky part. Some assessments are from 2012 (given the version and administration date), and you have scores for students for 2012, but the relationship between that school and the student is missing for the year of 2012.

It seems there's no direct relationship between an assessment and a school, the relationship seems to be via assessment->sections->school. But in the staging database, there are not records that relates an assessment with a section. Is that missing for some error, or it's possible data?

Thoughts?

edgarf commented 8 years ago

@regiscamimura Thanks for the update. The mis-match of numbers is happening on easol-dev instance, which is having demo-dataset, which doesn't have any issues. Regarding multiple-association - We have "Version" column (Filter item "Year") - so it would be logical only to filter StudentSchoolAssociation entries for defined year. Do you think this would solve the issue? I assume it's already being done like this and this is not the issue (I am just verifying).

I see you are mentioning staging database - let's come back to the easol-dev database. It has full dataset without errors. Thanks.

regiscamimura commented 8 years ago

@edgarf ok, I'll use the easol-dev database. But we still have two things to define:

  1. If a student has more than one score result per assessment, should it be counted twice in the # of students column?
  2. If the student DOES have an assessment score, lets say, for year 2012, but no direct association via StudentSchoolAssociation for year 2012, should it be excluded from the result set, or it's ok to just assume if they are in the assessment score, it will be in the StudentSchoolAssociation?
edgarf commented 8 years ago
  1. How is it done now? Is it different in index and details view?
  2. StudentSchoolAssociation is mandatory. We can exclude that results from dataset (if you will find this kind of data on easol-dev-staging2 - let me know).
regiscamimura commented 8 years ago

@edgarf

  1. It will count twice, and listed twice, in index and details views. Should we keep doing that?
edgarf commented 8 years ago

Yes let's do it for now. Important to keep it consistent on both Index and Detail Pages.

regiscamimura commented 8 years ago

@edgarf I have it done. In the current dev database, the list should be empty though, that's because the Score results are from 2007, 2008, 2009, 2010, 2012, and all the StudentSchoolAssociation records are from year 2011, so they are filtered.

I see the "average results" column was commented out. If I recall, there was something about the results can't be just calculated an average cause they have different types, criteria, etc... well, I just remove the column completely, let me know if you want me to put it back, or any other thought on that.

edgarf commented 8 years ago

@regiscamimura - sorry my mistake. It is possible that a student took assessment and didn't have StudentSchoolAssociation.

edgarf commented 8 years ago

@regiscamimura we have noticed that after this part in tables.js was added :

$('select[name^="filter["').on('change', function() {
        var name = $(this).attr('name');
        var hash = {};
        hash[name] = $(this).val();
        url_hash(hash);
    });

    $('input[name^="filter["').on('keyup', function() {
        var name = $(this).attr('name');
        var hash = {};
        hash[name] = $(this).val();
        url_hash(hash);
    });

    $(window).on('hashchange.table-filter', function() {
        var params = url_param();
        for (var i in params) {
            var $filter = $('select[name="'+ i +'"], input[name="'+ i +'"]').first();
            $filter.val(params[i]);
            if ($filter.length > 0) {
                if ($filter.is('input')) $filter.trigger('keyup.filter');
                if ($filter.is('select')) $filter.trigger('change.filter');
            }
        }
    });

The flex reports stopped working in Safari. Seems like he didn't like this selector - $('select[name^="filter["'). I have commented it out for now. Once you are here - please take a look

regiscamimura commented 8 years ago

@edgarf I got the selectors fixed and push it back to branch 338

edgarf commented 8 years ago

Thanks, did you have the ability to check whether flex reports are still working after implementing this?

regiscamimura commented 8 years ago

yes, I was first able to see how the charts were broken -- a JS error was preventing them to be displayed at all -- and after the change it was working well. I see a lot of layout issues in my safari 5.1 browser for windows though. Should I worry about that?

edgarf commented 8 years ago

Thank you. What about my previous comment? "@regiscamimura - sorry my mistake. It is possible that a student took assessment and didn't have StudentSchoolAssociation."

regiscamimura commented 8 years ago

@edgarf regarding students that took assessments and don't have a school association, how can we restrict the results to a school? I'm assuming we must take the relationship between an assessment and a school, but we don't actually have a direct relationship between assessment and schools, but:

That is done through the table edfi.AssessmentSection, but it happens that this table is empty on the dev database. Is that a failure in the dev data? Any ideas?

Also, if a student can get an assessment in a school he's not related to, that student may appear in the list of students in the assessment detail view. Is that ok?

If so, should we remove the link for students that actually have assessments in that school, but not related directly to the school? Or should we actually allow access to that student details page if they are related to the school not directly, but still related indirectly through the assessment?