Menu

#5969 [Feature:InstructorUI] Turn off gradeable due/release date

open
nobody
None
2020-12-22
2020-10-22
Anonymous
No

Originally created by: jportorreal00

Please check if the PR fulfills these requirements:

  • The PR title and message follows our guidelines
  • Tests for the changes have been added/updated (if possible)
  • Documentation has been updated/added if relevant

What is the current behavior?

[#5846]
Currently we are able to turn off submission due dates, but not release dates. The placement of gradeables on the homepage is also less than ideal when it comes to the gradeable placement. Gradebles with no due date end up in the "RELEASED" section.

What is the new behavior?

Turn on or off due dates and release dates. The placement of of gradeables is now improved based on the recommendations in the issue.

Other information?

This could be a breaking change since the "NOT NULL" constraint was dropped in the database. I found a few places where we rely on these dates existing so I have been changing them.

Discussion

  • Anonymous

    Anonymous - 2020-10-22

    Originally posted by: codecov[bot]

    Codecov Report

    Merging #5969 (ce3ab4f) into master (df57fae) will increase coverage by 0.02%.
    The diff coverage is 47.36%.

    Impacted file tree graph

    @@             Coverage Diff              @@
    ##             master    #5969      +/-   ##
    ============================================
    + Coverage     22.19%   22.22%   +0.02%     
    - Complexity     6365     6387      +22     
    ============================================
      Files           157      157              
      Lines         20842    20875      +33     
    ============================================
    + Hits           4626     4639      +13     
    - Misses        16216    16236      +20
    
    Flag Coverage Δ Complexity Δ
    autograder 12.97% <ø> (ø) 0.00 <ø> (ø)
    migrator 99.10% <ø> (ø) 0.00 <ø> (ø)
    php 20.96% <46.29%> (+0.02%) 0.00 <1.00> (ø)
    python_submitty_utils 84.28% <66.66%> (-0.33%) 0.00 <0.00> (ø)

    Flags with carried forward coverage won't be shown. Click here to find out more.

     
  • Anonymous

    Anonymous - 2020-11-14

    Originally posted by: shailpatels

    @jportorreal00 I'm still seeing the same issue where the option to release a gradeable exists for a gradeable with no release date. I was testing by creating a new gradeable

     
  • Anonymous

    Anonymous - 2020-11-17

    Originally posted by: shailpatels

    When switching to this branch and creating gradeables with null dates, then reverting or switching to an older branch causes the following frog error:

    @jportorreal00 , @bmcutler this might be a case where we would want a down migration to replace any null dates with a real date set way in the past or future or something

    app\exceptions\ValidationException (Code: 0) thrown in /usr/local/submitty/site/app/models/gradeable/Gradeable.php (Line 717) by:
                throw new ValidationException('Date validation failed', $errors);
    
    
    Message:
    Date validation failed
    
    Stack Trace:
    #0 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(791): app\models\gradeable\Gradeable->assertDates(Array)
    #1 /usr/local/submitty/site/app/models/gradeable/Gradeable.php(300): app\models\gradeable\Gradeable->setDates(Array)
    #2 /usr/local/submitty/site/app/libraries/database/DatabaseQueries.php(4453): app\models\gradeable\Gradeable->__construct(app\libraries\Core, Array)
    #3 unknown file(unknown line): app\libraries\database\DatabaseQueries->app\libraries\database\{closure}(Array)
    #4 /usr/local/submitty/site/app/libraries/database/DatabaseRowIterator.php(56): call_user_func(Closure, Array)
    #5 /usr/local/submitty/site/app/models/gradeable/GradeableList.php(72): app\libraries\database\DatabaseRowIterator->next()
    #6 /usr/local/submitty/site/app/controllers/NavigationController.php(32): app\models\gradeable\GradeableList->__construct(app\libraries\Core)
    #7 unknown file(unknown line): app\controllers\NavigationController->navigationPage()
    #8 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(217): call_user_func_array(Array, Array)
    #9 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(195): app\libraries\routers\WebRouter->run()
    #10 /usr/local/submitty/site/public/index.php(128): app\libraries\routers\WebRouter::getWebResponse(Symfony\Component\HttpFoundation\Request, app\libraries\Core)
    Extra Details:
    submission_due_date: Invalid date-time value!
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.